lsp: don't manually setup rust-analyzer. rust-tools already does
This commit is contained in:
parent
c661e05a2d
commit
a9c683440a
|
@ -41,10 +41,6 @@ return {
|
|||
capabilities = capabilities,
|
||||
})
|
||||
|
||||
lspconfig.rust_analyzer.setup({
|
||||
capabilities = capabilities,
|
||||
})
|
||||
|
||||
lspconfig.lua_ls.setup({
|
||||
capabilities = capabilities,
|
||||
settings = {
|
||||
|
@ -109,7 +105,11 @@ return {
|
|||
event = "BufEnter Cargo.toml",
|
||||
},
|
||||
},
|
||||
opts = {
|
||||
lazy = false,
|
||||
config = function()
|
||||
local capabilities = require("cmp_nvim_lsp").default_capabilities();
|
||||
|
||||
require("rust-tools").setup({
|
||||
server = {
|
||||
on_attach = function(_, bufnr)
|
||||
local rt = require("rust-tools");
|
||||
|
@ -118,8 +118,9 @@ return {
|
|||
-- Code action groups
|
||||
vim.keymap.set("n", "<Leader>a", rt.code_action_group.code_action_group, { buffer = bufnr })
|
||||
end,
|
||||
capabilities = capabilities,
|
||||
},
|
||||
},
|
||||
event = { "LspAttach *.rs" },
|
||||
});
|
||||
end,
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue