updates
This commit is contained in:
1 parent
21c52bc914
commit
ec1f8204dd
26 files changed
+457
-818
No files matched your search
@@ -1,5 +1,67 @@
|
||||
return {
|
||||
{ import = "lazyvim.plugins.extras.lang.rust" },
|
||||
{
|
||||
"simrat39/rust-tools.nvim",
|
||||
enabled = false,
|
||||
},
|
||||
{
|
||||
"mrcjkb/rustaceanvim",
|
||||
version = "^3", -- Recommended
|
||||
ft = { "rust" },
|
||||
opts = {
|
||||
server = {
|
||||
on_attach = function(client, bufnr)
|
||||
-- register which-key mappings
|
||||
local wk = require("which-key")
|
||||
-- stylua: ignore
|
||||
wk.register({
|
||||
["<leader>cR"] = { function() vim.cmd.RustLsp("codeAction") end, "Code Action" },
|
||||
["<leader>dr"] = { function() vim.cmd.RustLsp("debuggables") end, "Rust debuggables" },
|
||||
}, { mode = "n", buffer = bufnr })
|
||||
end,
|
||||
settings = {
|
||||
-- rust-analyzer language server configuration
|
||||
["rust-analyzer"] = {
|
||||
cargo = {
|
||||
allFeatures = true,
|
||||
loadOutDirsFromCheck = true,
|
||||
runBuildScripts = true,
|
||||
},
|
||||
-- Add clippy lints for Rust.
|
||||
checkOnSave = {
|
||||
allFeatures = true,
|
||||
command = "clippy",
|
||||
extraArgs = { "--no-deps" },
|
||||
},
|
||||
procMacro = {
|
||||
enable = true,
|
||||
ignored = {
|
||||
["async-trait"] = { "async_trait" },
|
||||
["napi-derive"] = { "napi" },
|
||||
["async-recursion"] = { "async_recursion" },
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
config = function(_, opts)
|
||||
vim.g.rustaceanvim = vim.tbl_deep_extend("force", {}, opts or {})
|
||||
end,
|
||||
},
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
opts = {
|
||||
servers = {
|
||||
rust_analyzer = {},
|
||||
},
|
||||
setup = {
|
||||
rust_analyzer = function()
|
||||
return true
|
||||
end,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
"luckasRanarison/nvim-devdocs",
|
||||
optional = true,
|
||||
|
||||
Reference in new issue
Block a user