Open adoyle-h opened 1 year ago
If there are more than 1 LSP attached to the buffer, they will overwrite each other. If there is one LSP with
on_save = false
, and one withon_save = true
, the autocommand will still be created. And on save, even the first LSP withon_save = false
will format the buffer. We need to check ifon_save
is true for each client that is attached to the buffer.
This won't happen. Because format_options
is relative to buffer filetype, not LSP client. The format_options
are same for same filetype, even on_attach
invoked with different client.
local format_options = vim.tbl_deep_extend('keep', M.format_options[vim.bo.filetype] or {}, { on_save = true })
This won't happen. Because format_options is relative to buffer filetype, not LSP client
Right, sorry. It's been a while since I worked on this. Ignore what I said
User can disable formatting on save.