From d5a4872a879869434b1fba04d26e57fe88f1965e Mon Sep 17 00:00:00 2001 From: Brad Clawsie Date: Thu, 13 Apr 2023 16:39:31 -0500 Subject: mv --- nvim/dotconfig/nvim/lua/plugins/lspconfig.lua | 48 +++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 nvim/dotconfig/nvim/lua/plugins/lspconfig.lua (limited to 'nvim/dotconfig') diff --git a/nvim/dotconfig/nvim/lua/plugins/lspconfig.lua b/nvim/dotconfig/nvim/lua/plugins/lspconfig.lua new file mode 100644 index 0000000..1314818 --- /dev/null +++ b/nvim/dotconfig/nvim/lua/plugins/lspconfig.lua @@ -0,0 +1,48 @@ +return { + { + "neovim/nvim-lspconfig", + dependencies = { + "simrat39/rust-tools.nvim", + }, + opts = { + servers = { + rust_analyzer = { + mason = false, + cmd = { vim.fn.expand("/usr/sbin/rust-analyzer") }, + settings = { + ["rust-analyzer"] = { + imports = { + granularity = { + group = "module", + }, + prefix = "self", + }, + cargo = { + allFeatures = true, + loadOutDirsFromCheck = true, + runBuildScripts = true, + buildScripts = { + enable = true, + }, + }, + procMacro = { + enable = true, + }, + checkOnSave = { + allFeatures = true, + command = "clippy", + extraArgs = { "--no-deps" }, + }, + }, + }, + }, + }, + setup = { + rust_analyzer = function(_, opts) + require("rust-tools").setup({ server = opts }) + return true + end, + }, + }, + }, +} -- cgit v1.2.3