From a385e1ab19c3fa1db099ea82dc64a524069718ce Mon Sep 17 00:00:00 2001 From: Michael Mandl Date: Mon, 21 Mar 2022 14:49:37 +0100 Subject: [PATCH] feat: enable clippy in rust-analyzer --- nvim/lua/plugins/lspconfig.lua | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/nvim/lua/plugins/lspconfig.lua b/nvim/lua/plugins/lspconfig.lua index 5ea01d4..a44db44 100644 --- a/nvim/lua/plugins/lspconfig.lua +++ b/nvim/lua/plugins/lspconfig.lua @@ -57,6 +57,15 @@ local extra_server_opts = { -- less|scss|json|json5|json-stringify|graphql|markdown|mdx|vue|yaml|glimmer|html|angular|lwc } end, + ["rust_analyzer"] = function(opts) + opts.settings = { + ["rust-analyzer"] = { + checkOnSave = { + command = "clippy" + } + } + } + end, ["sumneko_lua"] = function(opts) opts.settings = { Lua = {