Conversation
| default_format_opts = { | ||
| lsp_format = 'fallback', -- Use LSP formatting if available, otherwise use external formatters. Set to `false` to disable LSP formatting. | ||
| }, |
There was a problem hiding this comment.
If the theme of this PR is to reduce unexpected formatting on save, I think these lines should be removed.
There was a problem hiding this comment.
Ah but then the lua formatting will not work. Hmm not sure.
There was a problem hiding this comment.
Anyway, that comment is not correct. Fallback means using LSP when no other formatters are available, not prioritizing it.
See conform documentation here
There was a problem hiding this comment.
those lines were added just so you don't have to repeat it in 2 places (previously it was in 693 and 674)
|
What is the reason for switching to stylua's LSP instead of its CLI? I think it was more clear when stylua was defined in the |
|
I tried using the Stylua LSP for formatting and removing it from |
did you also disable the formatting server capability by adding the following line in client.server_capabilities.documentFormattingProvider = false -- Disable formatting (formatting is done by stylua)It seems it is caused by a race condition betweeen stylua and lua_ls. They both run on the same input, and stylua's result arrives earlier, so it was getting overriden by lua_ls. Another solution that worked for me was setting |
|
Oh yeah, I didn't see that, my bad |
dc5f2fe to
ce353a9
Compare
Does it work now? |
format_on_saveto a blacklistfixes #1819