Lsp zero auto formatting #193
Replies: 1 comment 1 reply
-
That was probably a bug. I just fixed it, |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am a recent neovim adopter and this plugin has been a lifesaver! I have a question about the integration on the format_on_save feature shown in the docs.
I frequently program on python with a few legacy codebases (which unfortunately are not autoformatted) - for this I integrate null-ls using black and autopep8 with a plugin called lsp-format-modifications which ensures only git diffs are formatted. This works fine.
I have recently started taking up rust and I'd really like to get auto formatting setup, the issue I run into is that when I setup just the format_on_save, there is no action taken on save i.e. the file always remains the same
The lsp.buffer_autoformat() on lsp attach will work every save but unfortunately breaks my aforementioned workflow.
I appreciate that this is a very niche situation, on a sepparate note I quite like the ability to chose the server used for the formatting, I was wondering if there is any particular reason for the behaviour of format_on_save. I will leave my config bellow (It is worth noting that I also tried it with a minimal lsp-zero config excluding all of the null-ls or format-modification nonsense).
Beta Was this translation helpful? Give feedback.
All reactions