1
0

plugins/lsp: use clippy if available

This commit is contained in:
Patrick Auernig 2024-10-20 17:03:27 +02:00
parent 4528deddc2
commit a3151f43c8

View File

@ -15,8 +15,13 @@ local function rust_analyzer_setup(lsp_config)
cargo = {
features = "all"
},
checkOnSave = true,
}
if vim.fn.executable("cargo-clippy") == 1 then
rust_analyzer_settings.check = { command = "clippy" }
end
-- Don't have rustup available if using nix shell
if vim.fn.executable("rustup") == 1 then
rust_analyzer_settings = vim.tbl_extend("keep", rust_analyzer_settings, {