CppCXY / EmmyLuaCodeStyle

fast, powerful, and feature-rich Lua formatting and checking tool.
MIT License
140 stars 27 forks source link

'auto' is not a valid value in the editorconfig spec for end_of_line #81

Closed craigmac closed 1 year ago

craigmac commented 1 year ago

https://github.com/CppCXY/EmmyLuaCodeStyle/blob/ec2cd0e2cca3b1fa2e08c8bc8d146afd1bdfba19/lua.template.editorconfig#L19

Ran into this issue when testing out neovim nightly build which now ships with editorconfig support built-in: https://github.com/neovim/neovim/issues/21669

CppCXY commented 1 year ago

'auto' is a very meaningful option, but it is not an option specified by editorconfig, so what you want to do? the short-term solution to this problem is to remove the definition of end_of_line because the default value is auto

craigmac commented 1 year ago

I agree it's a meaningful option, and wish that it was supported everywhere, and it's great that you do. However, unless you state this front-and-centre somewhere you're going to get more issues about this as people copy and paste the default config and expect it to work with Neovim out of the box. I think at least a big warning about it in the file would suffice!

CppCXY commented 1 year ago

I agree

CppCXY commented 1 year ago

have add note for this option https://github.com/CppCXY/EmmyLuaCodeStyle/blob/9ffcbcb75b2345922f1e2e2f6c31fba4ff2b1957/lua.template.editorconfig#L19