[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANiq72mt=jWMoKPioaii_35ojzs0QTbmBQuBde_iUO1cNtPHrQ@mail.gmail.com>
Date: Fri, 9 Jun 2023 12:49:09 +0200
From: Miguel Ojeda <miguel.ojeda.sandonis@...il.com>
To: Íñigo Huguet <ihuguet@...hat.com>
Cc: Jonathan Corbet <corbet@....net>, ojeda@...nel.org,
danny@...ag0n.dev, masahiroy@...nel.org, jgg@...dia.com,
mic@...ikod.net, linux-kernel@...r.kernel.org, joe@...ches.com,
linux@...musvillemoes.dk, willy@...radead.org,
mailhol.vincent@...adoo.fr
Subject: Re: [PATCH v4] Add .editorconfig file for basic formatting
On Fri, Jun 9, 2023 at 10:49 AM Íñigo Huguet <ihuguet@...hat.com> wrote:
>
> This is a valid option, indeed, but In my opinion we are overlooking this.
>
> Adding an .editorconfig will not silently reconfigure the editors of
> everyone because for most editors you need to install a plugin to use
> it. In my opinion, that's enough "opt-in". Here is the list of editors
> that have built-in support, and those that need a plugin install. I
> don't think that those with built-in support are widely used for
> kernel development, and many of them allow to disable the feature.
It is true that some of the big ones (Emacs, Vim, VS Code...) do not,
but e.g. NeoVim and Kate (`KTextEditor`) both seem to support it, and
those are used by some kernel developers. In particular, NeoVim says
it enables it by default, if I am reading correctly.
But perhaps those two behave as we want.
> I see this as the exact same case as adding a .clang-format file, as
> we already have. Some editors, either built-in or via plugin,
> automatically reformat code when this file is present. And it's far
> more "intrusive" than editorconfig.
I do not recall any complaints about code getting reformatted
automatically -- which editors are you referring to? (i.e. that
natively reformat the code, in its default configuration).
In any case, it was a slightly more constrained case: `clang-format`
(and LLVM/Clang) needed to be installed with a new enough version,
which may not have been too common back then, and it ""only"" applied
to C code.
Cheers,
Miguel
Powered by blists - more mailing lists