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
|
-- vim-moonfly theme
|
||||||
{ "bluz71/vim-moonfly-colors", as = "moonfly" },
|
{ "bluz71/vim-moonfly-colors", as = "moonfly" },
|
||||||
-- Rust tools
|
-- Rust tools
|
||||||
"simrat39/rust-tools.nvim",
|
{
|
||||||
|
"mrcjkb/rustaceanvim",
|
||||||
|
version = "^4",
|
||||||
|
ft = { "rust" },
|
||||||
|
},
|
||||||
-- Automatically add bracket pairs
|
-- Automatically add bracket pairs
|
||||||
"windwp/nvim-autopairs",
|
"windwp/nvim-autopairs",
|
||||||
-- Syntax highlighting for Fish scripts
|
-- 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 = {
|
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"] = {
|
["rust-analyzer"] = {
|
||||||
check = {
|
check = {
|
||||||
command = "clippy"
|
command = "clippy"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
-- DAP configuration
|
||||||
|
dap = {
|
||||||
},
|
},
|
||||||
})
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue