From 3f2964cfcb61588cb9f7784e1fc294c73dd505c2 Mon Sep 17 00:00:00 2001 From: Ade Attwood Date: Wed, 4 Sep 2024 19:11:04 +0100 Subject: [PATCH] feat(vim): display clippy diagnostics on save --- site-modules/core/files/vim/plugin/lsp.lua | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/site-modules/core/files/vim/plugin/lsp.lua b/site-modules/core/files/vim/plugin/lsp.lua index bb9cf22..a2ca0ab 100644 --- a/site-modules/core/files/vim/plugin/lsp.lua +++ b/site-modules/core/files/vim/plugin/lsp.lua @@ -20,7 +20,15 @@ local servers = { cmd = { "bundle", "exec", "solargraph", "stdio" }, }, -- Rust - rust_analyzer = {}, + rust_analyzer = { + settings = { + ["rust-analyzer"] = { + checkOnSave = { + command = "clippy", + }, + }, + }, + }, -- Lua for the vim config and plugin dev lua_ls = { settings = {