nvim: rust-analyzer config
This commit is contained in:
parent
71f2b5356a
commit
57ad37b67e
1 changed files with 3 additions and 13 deletions
|
@ -3,15 +3,10 @@ return {
|
||||||
"neovim/nvim-lspconfig",
|
"neovim/nvim-lspconfig",
|
||||||
opts = {
|
opts = {
|
||||||
inlay_hints = { enabled = true },
|
inlay_hints = { enabled = true },
|
||||||
-- capabilities = {
|
|
||||||
-- workspace = {
|
|
||||||
-- didChangeWatchedFiles = {
|
|
||||||
-- dynamicRegistration = false,
|
|
||||||
-- },
|
|
||||||
-- },
|
|
||||||
-- },
|
|
||||||
servers = {
|
servers = {
|
||||||
rust_analyzer = {
|
rust_analyzer = {
|
||||||
|
mason = false,
|
||||||
|
targetDir = true,
|
||||||
keys = {
|
keys = {
|
||||||
{ "K", "<cmd>RustHoverActions<cr>", desc = "Hover Actions (Rust)" },
|
{ "K", "<cmd>RustHoverActions<cr>", desc = "Hover Actions (Rust)" },
|
||||||
{ "<leader>cR", "<cmd>RustCodeAction<cr>", desc = "Code Action (Rust)" },
|
{ "<leader>cR", "<cmd>RustCodeAction<cr>", desc = "Code Action (Rust)" },
|
||||||
|
@ -23,12 +18,7 @@ return {
|
||||||
allFeatures = true,
|
allFeatures = true,
|
||||||
loadOutDirsFromCheck = true,
|
loadOutDirsFromCheck = true,
|
||||||
runBuildScripts = true,
|
runBuildScripts = true,
|
||||||
},
|
targetDir = true,
|
||||||
-- Add clippy lints for Rust.
|
|
||||||
checkOnSave = {
|
|
||||||
allFeatures = true,
|
|
||||||
command = "clippy",
|
|
||||||
extraArgs = { "--no-deps" },
|
|
||||||
},
|
},
|
||||||
procMacro = {
|
procMacro = {
|
||||||
enable = true,
|
enable = true,
|
||||||
|
|
Loading…
Reference in a new issue