Finally, +1 from me.

I think I had proposed either ".dir-locals.el" or ".editorconfig"
for ::guru which was rejected because
"users should configure this themselves".

Reviewing the given configuration I think the only one variable that
can be moved to top ("[*]" section) is "charset = utf-8".
Rest could break files from FILESDIR, especially for .NET packages.

Additionally, I think the format should be "strongly" defines so I would also add the "tab_width = 4".

Btw if we could prevent tab+space mixing (from start of the line)
with editorconfig that would be great.
Currently I have to manually adjust sh-mode's indentation and
I can not just mark whole buffer and press TAB to adjust indents.

W dniu 24.03.2023 o 03:14, Sam James pisze:
This allows conveniently editing ebuilds and eclasses in editors which don't
have a specific ebuild mode like Emacs and Vim do.

For example, kde-apps/kate with kde-frameworks/ktexteditor[editorconfig] can
automatically read this file and adjust settings appropriately.

It's possible that going forward we may want to have pkgdev support custom
keys in this file for e.g. copyright year mangling too.

Signed-off-by: Sam James <s...@gentoo.org>
---
  .editorconfig | 8 ++++++++
  1 file changed, 8 insertions(+)
  create mode 100644 .editorconfig

diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 000000000000..94d5c584f580
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,8 @@
+root = true
+
+[*.{ebuild,eclass}]
+charset = utf-8
+end_of_line = lf
+insert_final_newline = true
+indent_style = tab
+trim_trailing_whitespace = true

--
Have a great day!

~ Maciej XGQT Barć

x...@gentoo.org
Gentoo Linux developer
(dotnet, emacs, math, ml, nim, scheme, sci)
https://wiki.gentoo.org/wiki/User:Xgqt
9B0A 4C5D 02A3 B43C 9D6F D6B1 14D7 4A1F 43A6 AC3C

Attachment: OpenPGP_0x14D74A1F43A6AC3C.asc
Description: OpenPGP public key

Attachment: OpenPGP_signature
Description: OpenPGP digital signature

Reply via email to