nixvim icon indicating copy to clipboard operation
nixvim copied to clipboard

Disabling autoformat doesn't work

Open rollf opened this issue 10 months ago • 5 comments

Hi,

I believe the FormatDisable / FormatEnable commands do not work. After executing :FormatDisable, the buffer still gets formatted. However, :lua vim.g.disable_autoformat=true allows to correctly disable formatting (as expected).

I'm suspecting the usage of lsp-format (a plugin that is enabled here) causes this as it defines the same commands (but I'm only guessing).

Thanks for sharing your config!

EDIT: Changed wording for neutrality

rollf avatar Mar 18 '25 05:03 rollf

In this video, the buffer is auto-formated even though :FormatDisable is invoked. I believe this is because lsp-format's FormatDisable is invoked and it does not cause conforn.nvim to not format. However, disabling via the variable works.

Image

rollf avatar Mar 19 '25 05:03 rollf

Thanks @rollf for the feedback. Will pick this up next week. Pretty swamped with work atm. Appreciate the input!

dc-tec avatar Mar 22 '25 10:03 dc-tec

Hey, I'd like to get this fixed. If you have an idea, I'm happy to propose a PR.

rollf avatar Jun 27 '25 18:06 rollf

Hey, I'd like to get this fixed. If you have an idea, I'm happy to propose a PR.

Please feel free to shoot in a PR! This one slipped my mind, sorry for that.

dc-tec avatar Jul 05 '25 15:07 dc-tec

@dc-tec I attempted a fix here.

rollf avatar Sep 08 '25 11:09 rollf