added lsp formatting to some clients

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