From 21c68324d80654f717aacb847c0b57b368eb8613 Mon Sep 17 00:00:00 2001 From: Brad Clawsie Date: Wed, 12 Apr 2023 16:12:54 -0500 Subject: rust-anbalyzer --- nvim/lspconfig.lua | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 nvim/lspconfig.lua diff --git a/nvim/lspconfig.lua b/nvim/lspconfig.lua new file mode 100644 index 0000000..6d1d920 --- /dev/null +++ b/nvim/lspconfig.lua @@ -0,0 +1,40 @@ +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 = { + buildScripts = { + enable = true, + }, + }, + procMacro = { + enable = true, + }, + }, + }, + }, + }, + setup = { + rust_analyzer = function(_, opts) + require("rust-tools").setup({ server = opts }) + return true + end, + }, + }, + }, +} -- cgit v1.2.3