chg: Switched to rustaceanvim for Rust
This commit is contained in:
parent
d89548599e
commit
1371124454
3 changed files with 34 additions and 24 deletions
|
@ -52,7 +52,11 @@ require("lazy").setup(
|
|||
-- vim-moonfly theme
|
||||
{ "bluz71/vim-moonfly-colors", as = "moonfly" },
|
||||
-- Rust tools
|
||||
"simrat39/rust-tools.nvim",
|
||||
{
|
||||
"mrcjkb/rustaceanvim",
|
||||
version = "^4",
|
||||
ft = { "rust" },
|
||||
},
|
||||
-- Automatically add bracket pairs
|
||||
"windwp/nvim-autopairs",
|
||||
-- Syntax highlighting for Fish scripts
|
||||
|
|
|
@ -8,14 +8,3 @@ lspconfig.lua_ls.setup({
|
|||
},
|
||||
}
|
||||
})
|
||||
|
||||
lspconfig.rust_analyzer.setup {
|
||||
-- Server-specific settings. See `:help lspconfig-setup`
|
||||
settings = {
|
||||
['rust-analyzer'] = {
|
||||
check = {
|
||||
command = "clippy",
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
@ -1,12 +1,29 @@
|
|||
require("rust-tools").setup({
|
||||
vim.g.rustaceanvim = {
|
||||
-- Plugin configuration
|
||||
tools = {
|
||||
},
|
||||
-- LSP configuration
|
||||
server = {
|
||||
settings = {
|
||||
on_attach = function(_, bufnr)
|
||||
vim.keymap.set(
|
||||
"n",
|
||||
"<localleader>a",
|
||||
function()
|
||||
vim.cmd.RustLsp('codeAction') -- supports rust-analyzer's grouping
|
||||
end,
|
||||
{ silent = true, buffer = bufnr, noremap = true }
|
||||
)
|
||||
end,
|
||||
default_settings = {
|
||||
-- rust-analyzer language server configuration
|
||||
["rust-analyzer"] = {
|
||||
check = {
|
||||
command = "clippy"
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
-- DAP configuration
|
||||
dap = {
|
||||
},
|
||||
})
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue