Darazaki / indent-o-matic

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

[Feature request]: Command mode only #18

Closed lopi-py closed 1 year ago

lopi-py commented 1 year ago

I like the plugin but may conflict with editorconfig.nvim, would be nice to only use this plugin with the command IndentOMatic, maybe enable an option in the setup?, I know this is against the rules

  • No configuration required

but this is a real use case, maybe editorconfig can help with something like vim.b.editorconfig_handled, any thoughts @Darazaki ?

Darazaki commented 1 year ago

Hi @lopi-py! Does adding au! indent_o_matic to your config solve this issue? This is how I expected people to disable the "automatic execution" part of the plugin but I completely forgot to document it, my bad

It's not the first time I hear about EditorConfig however I'm still not sure how to handle it. If a file has tab indentation but EditorConfig says it should be 2 spaces indented then which one should be trusted? Currently AFAIK the final answer is dependent on which plugin gets executed first

Do you know of a way to force an augroup to execute before another? This would be the ideal solution as this could allow the user to define which plugin should get priority. If not then editorconfig.nvim, indent-o-matic and other indentation detection plugins may have to support each other

Darazaki commented 1 year ago

Hi again @lopi-py. Does au! indent_o_matic solve your issue?

I'm still not certain what to do about EditorConfig so if you have any idea please tell me! :)

lopi-py commented 1 year ago

@Darazaki ahh hey sorry for that huge delay 😄. yes it solves for the moment, I'm going to close this and will reopen if I experience issues, thanks for replying

Darazaki commented 1 year ago

No worries, more delay between your responses means more time for me to ~be lazy~ think about the issue at hand ;)

I've decided to add a bit more documentation today. Thanks for pointing out the lack of an obvious command-only mode! (And yeah, feel free to reopen if there's anything missing)