Darazaki / indent-o-matic

Dumb automatic fast indentation detection for Neovim written in Lua
MIT License
176 stars 13 forks source link

Integrate with nvim native editorconfig #21

Closed meijieru closed 1 year ago

meijieru commented 1 year ago

Editorconfig is now a native feature of nvim nightly. It would be great if the plugin could be compatible with it, in which this plugin only takes effect when the editorconfig doesn't set the configs.

Darazaki commented 1 year ago

I didn't know that, thanks for telling me!

I'll take a look at it this Thursday to see if there's any already available API to know if a buffer's indentation is controlled by EditorConfig and hopefully push a new indent-o-matic version then :)

Assuming this goes well, do you think indentation detection should be disabled by default if EditorConfig is already active? (This will probably be an option but since I don't use EditorConfig I don't know what people would expect to be the default)

meijieru commented 1 year ago

Assuming this goes well, do you think indentation detection should be disabled by default if EditorConfig is already active?

I think so. And you can check which options are set by editorconfig by vim.b.editorconfig.

Darazaki commented 1 year ago

Wow, this should be pretty straightforward then! Thanks a lot :)

meijieru commented 1 year ago

I used it together already for a while. Seems no problem.