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