diff options
| author | Brad Clawsie <brad@b7j0c.org> | 2023-04-13 16:39:31 -0500 |
|---|---|---|
| committer | Brad Clawsie <brad@b7j0c.org> | 2023-04-13 16:39:31 -0500 |
| commit | d5a4872a879869434b1fba04d26e57fe88f1965e (patch) | |
| tree | 424b781c32ab6d4625a5ae3842354c6d0ea891fd /nvim/dotconfig | |
| parent | 5e68edd3b0a0edc5e02586fe6993654bc7ec7264 (diff) | |
mv
Diffstat (limited to 'nvim/dotconfig')
| -rw-r--r-- | nvim/dotconfig/nvim/lua/plugins/lspconfig.lua | 48 |
1 files changed, 48 insertions, 0 deletions
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, + }, + }, + }, +} |
