diff options
| author | Brad Clawsie <brad@b7j0c.org> | 2023-04-12 16:12:54 -0500 |
|---|---|---|
| committer | Brad Clawsie <brad@b7j0c.org> | 2023-04-12 16:12:54 -0500 |
| commit | 21c68324d80654f717aacb847c0b57b368eb8613 (patch) | |
| tree | 849bb026c4a5a66bf93c4eaf902b666e8f5b6183 /nvim/lspconfig.lua | |
| parent | 73dc5cd4498b0493ea723bd2fe8804fc7c08c6ad (diff) | |
rust-anbalyzer
Diffstat (limited to 'nvim/lspconfig.lua')
| -rw-r--r-- | nvim/lspconfig.lua | 40 |
1 files changed, 40 insertions, 0 deletions
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, + }, + }, + }, +} |
