added lsp formatting to some clients

This commit is contained in:
2025-06-28 18:35:50 -05:00
parent 7b2d3303eb
commit fe74ce1bee
+9 -4
View File
@@ -33,11 +33,16 @@ vim.api.nvim_create_autocmd("LspAttach", {
return return
end end
client.server_capabilities.documentFormattingProvider = false local enable_formatting = {
client.server_capabilities.documentRangeFormattingProvider = false ["rust-analyzer"] = true,
}
local is_rust_analyzer = client.name == "rust-analyzer" if enable_formatting[client.name] == nil then
require("plugins.lsp_keymaps").set_lsp_keymaps(ev.buf, is_rust_analyzer) client.server_capabilities.documentFormattingProvider = false
client.server_capabilities.documentRangeFormattingProvider = false
end
require("plugins.lsp_keymaps").set_lsp_keymaps(ev.buf, client.name == "rust-analyzer")
end, end,
}) })