added lsp formatting to some clients
This commit is contained in:
@@ -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,
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user