From e86b6655d8de355fc2656c85877c3dbddb7197a1 Mon Sep 17 00:00:00 2001 From: qwjyh Date: Mon, 18 Mar 2024 10:32:49 +0900 Subject: [PATCH] update: nvim: use clippy for check in rust-analyzer --- dotfiles/neovim/init.lua | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/dotfiles/neovim/init.lua b/dotfiles/neovim/init.lua index daf4618..a952464 100644 --- a/dotfiles/neovim/init.lua +++ b/dotfiles/neovim/init.lua @@ -632,7 +632,19 @@ lspconfig.typst_lsp.setup { single_file_support = true, } -local lss = { "pyright", "rust_analyzer", "texlab", "ccls", "clangd", "tsserver", --[["tailwindcss"]] "hls", "cmake", +lspconfig.rust_analyzer.setup { + on_attach = on_attach, + capabilities = capabilities, + settings = { + ['rust-analyzer'] = { + check = { + command = "clippy", + } + } + } +} + +local lss = { "pyright", "texlab", "ccls", "clangd", "tsserver", --[["tailwindcss"]] "hls", "cmake", "csharp_ls", "html", "r_language_server", "ruff_lsp", "cssls" } for _, ls in pairs(lss) do lspconfig[ls].setup {