From 005e14e6b6d3d558f370f1fb213bd86f8c3572ca Mon Sep 17 00:00:00 2001 From: Youwen Wu Date: Sun, 21 Apr 2024 19:00:55 -0700 Subject: [PATCH] use 'cargo clippy' for rust-analyzer semantic analysis and linting --- lua/plugins/lsp.lua | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lua/plugins/lsp.lua b/lua/plugins/lsp.lua index 83dfd7a..fdbdc87 100644 --- a/lua/plugins/lsp.lua +++ b/lua/plugins/lsp.lua @@ -21,6 +21,15 @@ return { ["textDocument/publishDiagnostics"] = function(...) end, }, }, + rust_analyzer = { + settings = { + ["rust-analyzer"] = { + checkOnSave = { + command = "clippy", + }, + }, + }, + }, }, diagnostics = { underline = true,