Add .editorconfig

Поиск
Список
Период
Сортировка
Искать

Add .editorconfig

От:
Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Дата:
Вложения:
There were a couple of recent threads that wanted to add an 
.editorconfig file but never actually ended up doing so.[0][1]  Here is 
a patch.  It is meant to match more or less what's in .dir-locals.el.

I have only tested this with the GitHub view, not with an actual editor.

[0]: 
https://www.postgresql.org/message-id/flat/20180605172252.GA2433%40fetter.org
[1]: 
https://www.postgresql.org/message-id/flat/20180529153617.c72llpzbvt46chr6%40alap3.anarazel.de

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Re: Add .editorconfig

От:
Daniel Gustafsson <daniel@yesql.se>
Дата:
> On 11 Dec 2019, at 17:00, Peter Eisentraut  wrote:
> 
> There were a couple of recent threads that wanted to add an .editorconfig file but never actually ended up doing so.[0][1]  Here is a patch.  It is meant to match more or less what's in .dir-locals.el.

+[*.{c,h,l,y,pl,pm}]

What about *.sh?

Not that there is much of Python in the tree, but shouldn't those also be
covered if we do this?

[*.py]
indent_style = space
indent_size = 4

cheers ./daniel

Re: Add .editorconfig

От:
Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Дата:
On 2019-12-11 17:09, Daniel Gustafsson wrote:
>> On 11 Dec 2019, at 17:00, Peter Eisentraut  wrote:
>>
>> There were a couple of recent threads that wanted to add an .editorconfig file but never actually ended up doing so.[0][1]  Here is a patch.  It is meant to match more or less what's in .dir-locals.el.
> 
> +[*.{c,h,l,y,pl,pm}]
> 
> What about *.sh?
> 
> Not that there is much of Python in the tree, but shouldn't those also be
> covered if we do this?
> 
> [*.py]
> indent_style = space
> indent_size = 4

Those were not in the Emacs config either.

I'd be inclined to leave the Python stuff alone, in particular.  The 
PEP-8 style appears to be universally accepted as the default, so we 
don't need to specify it here.  We only need to specify what's different 
or where no sensible default exists.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


Re: Add .editorconfig

От:
Andreas Karlsson <andreas@proxel.se>
Дата:
I have not used .editorconfig that much, but would it makes sense to add 
the below?

[*]
end_of_line = lf

-- 
Andreas Karlsson


Re: Add .editorconfig

От:
Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Дата:
On 2019-12-11 18:54, Andreas Karlsson wrote:
> I have not used .editorconfig that much, but would it makes sense to add
> the below?
> 
> [*]
> end_of_line = lf

I think that would best be done in response to an actual need.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


Re: Add .editorconfig

От:
Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Дата:
On 2019-12-11 17:00, Peter Eisentraut wrote:
> There were a couple of recent threads that wanted to add an
> .editorconfig file but never actually ended up doing so.[0][1]  Here is
> a patch.  It is meant to match more or less what's in .dir-locals.el.

committed

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


FAQ