rust linting

This commit is contained in:
2026-09-02 16:29:47 +02:00
parent 694a305855
commit a050d87439
4 changed files with 36 additions and 22 deletions
@@ -52,6 +52,7 @@ return {
"cssls", -- CSS
"bashls", -- Bash
"lua_ls", -- Lua
"rust_analyzer", -- Rust
--"stylua",
},
})
@@ -147,6 +148,15 @@ return {
-- filetypes and tsserver/request forwarding to ts_ls (hybrid mode)
vim.lsp.config("vue_ls", {})
-- Rust
vim.lsp.config("rust_analyzer", {
setting = {
["rust-analyzer"] = {
checkOnSave = { command = "clippy" },
},
},
})
-- Other languages
vim.lsp.config("jsonls", {})
vim.lsp.config("yamlls", {})
@@ -164,6 +174,7 @@ return {
vim.lsp.enable("html")
vim.lsp.enable("cssls")
vim.lsp.enable("bashls")
vim.lsp.enable("rust_analyzer")
end,
},
}
@@ -20,6 +20,7 @@ return {
markdown = { "prettier" },
sh = { "shfmt" },
bash = { "shfmt" },
rust = { "rustfmt" },
},
})
@@ -14,6 +14,7 @@ return {
json = { "jsonlint" },
yaml = { "yamllint" },
markdown = { "markdownlint" },
rust = { "clippy" },
}
vim.api.nvim_create_autocmd({ "BufWritePost" }, {
@@ -52,6 +52,7 @@ return {
"bash",
"markdown",
"markdown_inline",
"rust",
}
-- Install parsers