From d946d36f1a4d24fc9eac59f2b60daba139b47d15 Mon Sep 17 00:00:00 2001 From: Rokas Puzonas Date: Fri, 1 Apr 2022 22:21:20 +0300 Subject: [PATCH] fix: configure rust clippy lsp --- lua/config/lspconfig.lua | 9 ++++++++- lua/options.lua | 1 - 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/lua/config/lspconfig.lua b/lua/config/lspconfig.lua index 1f6bd60..2220020 100644 --- a/lua/config/lspconfig.lua +++ b/lua/config/lspconfig.lua @@ -66,6 +66,14 @@ M.server_settings = { -- library = vim.api.nvim_get_runtime_file("", true) -- }, } + }, + + rust_analyzer = { + ["rust-analyzer"] = { + checkOnSave = { + command = "clippy" + } + } } } @@ -148,4 +156,3 @@ if packer_plugins['nvim-lsp-installer'] and packer_plugins['nvim-lsp-installer'] end return M - diff --git a/lua/options.lua b/lua/options.lua index 42a2b69..9812d8f 100644 --- a/lua/options.lua +++ b/lua/options.lua @@ -100,4 +100,3 @@ opt('softtabstop', tab_size, buffer) -- Place splits below and to the right by default opt('splitbelow', true) opt('splitright', true) -