fix rust plugin

This commit is contained in:
Max Känner 2023-09-18 13:19:58 +02:00
parent 5a80e98be9
commit 676368ec87
2 changed files with 34 additions and 2 deletions

View File

@ -7,6 +7,8 @@ return {
"--", "--",
"-W", "clippy::pedantic", "-W", "clippy::pedantic",
"-W", "clippy::nursery", "-W", "clippy::nursery",
"-W", "clippy::unwrap_used",
"-W", "clippy::expect_used",
}, },
}, },
}, },

View File

@ -1,3 +1,22 @@
require("rust-tools").setup({
tools = {
inlay_hints = {
auto = true
}
},
server = {
checkOnSave = {
command = "clippy",
extraArgs = {
"--",
"-W", "clippy::pedantic",
"-W", "clippy::nursery",
"-W", "clippy::unwrap_used",
"-W", "clippy::expect_used",
},
},
},
})
return { return {
["simrat39/rust-tools.nvim"] = { ["simrat39/rust-tools.nvim"] = {
after = { "mason-lspconfig.nvim" }, after = { "mason-lspconfig.nvim" },
@ -5,10 +24,21 @@ return {
require("rust-tools").setup({ require("rust-tools").setup({
tools = { tools = {
inlay_hints = { inlay_hints = {
auto = false auto = true
} }
}, },
server = astronvim.lsp.config "rust_analyzer", server = {
checkOnSave = {
command = "clippy",
extraArgs = {
"--",
"-W", "clippy::pedantic",
"-W", "clippy::nursery",
"-W", "clippy::unwrap_used",
"-W", "clippy::expect_used",
},
},
},
}) })
end, end,
}, },