stevearc / conform.nvim

Lightweight yet powerful formatter plugin for Neovim
MIT License
3.01k stars 156 forks source link

fix: correctly call `lsp_format = 'fallback'` #462

Closed dpetka2001 closed 3 months ago

dpetka2001 commented 3 months ago

This fixes the fallback behavior to use it when no other formatter has been used, instead of checking for filetype formatters as well. I tested it locally and it seems to work without any side-effects.

Please feel free to disregard this if you think a better approach is available or this PR introduces some side-effects that I can't think of.

stevearc commented 3 months ago

Thanks for the fix! This does fix the issue, but I went with bde3bee1773c96212b6c49f009e05174f932c23a instead. I think it is a "more correct" way to address the problem

dpetka2001 commented 3 months ago

I guess M.will_fallback_lsp is not used any more? Or am I misunderstanding something?

stevearc commented 3 months ago

M.will_fallback_lsp is not used anymore. It is preserved to retain backwards compatibility, but we don't call it directly.