From f36dae495ef25a453d1b0ac0d457e52673d565bb Mon Sep 17 00:00:00 2001 From: Anthony Cicchetti Date: Sun, 4 Dec 2022 14:34:54 -0500 Subject: [PATCH] Fix LSPConfig --- nvim/fnl/config/plugin/lspconfig.fnl | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/nvim/fnl/config/plugin/lspconfig.fnl b/nvim/fnl/config/plugin/lspconfig.fnl index 082bca1..6e072dd 100644 --- a/nvim/fnl/config/plugin/lspconfig.fnl +++ b/nvim/fnl/config/plugin/lspconfig.fnl @@ -6,8 +6,29 @@ (let [(lspconfig? lspconfig) (pcall require :lspconfig) (mason? mason) (pcall require :mason) (mason-lsp? mason-lsp) (pcall require :mason-lspconfig)] - (when ok? + (when mason-lsp? (mason.setup) (mason-lsp.setup) - (lspconfig.rust_analyzer.setup {}) + (lspconfig.rust_analyzer.setup { + :cmd ["rustup" "run" "stable" "rust-analyzer"] + :settings {:rust-analyzer { + :cargo { + :buildScripts { + :enable true + } + } + :procMacro { + :enable true + } + :checkOnSave { + :command "clippy" + } + :inlayHints { + :bindingModeHints { + :enable true + } + } + } + } + }) (lspconfig.yamlls.setup {})))