From 9faf7521892f3877885a4107ee1c31502c0c5a61 Mon Sep 17 00:00:00 2001 From: Price Hiller Date: Wed, 10 Jul 2024 03:19:51 -0500 Subject: [PATCH] feat(nvim): improve rust lsp config --- .../.config/nvim/lua/plugins/configs/lsp.lua | 23 ++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/users/price/dots/.config/nvim/lua/plugins/configs/lsp.lua b/users/price/dots/.config/nvim/lua/plugins/configs/lsp.lua index 42d67e96..26988dd7 100644 --- a/users/price/dots/.config/nvim/lua/plugins/configs/lsp.lua +++ b/users/price/dots/.config/nvim/lua/plugins/configs/lsp.lua @@ -94,7 +94,7 @@ return { { "mrcjkb/rustaceanvim", ft = { "rust" }, - config = function() + init = function() vim.g.rustaceanvim = { dap = { adapter = { @@ -106,7 +106,27 @@ return { }, }, }, + server = { + default_settings = { + ["rust-analyzer"] = { + cargo = { + allFeatures = true, + loadOutDirsFromCheck = true, + runBuildScripts = true, + }, + checkOnSave = { + allFeatures = true, + allTargets = true, + command = "clippy", + }, + procMacro = { + enable = true, + }, + }, + }, + }, tools = { + enable_clippy = true, executor = require("rustaceanvim.executors").termopen, hover_actions = { replace_builtin_hover = false, @@ -114,6 +134,7 @@ return { }, } end, + config = false, }, { "williamboman/mason.nvim",