diff --git a/config/nvim/lua/core/lsp.lua b/config/nvim/lua/core/lsp.lua new file mode 100644 index 0000000..43936f7 --- /dev/null +++ b/config/nvim/lua/core/lsp.lua @@ -0,0 +1,28 @@ +local nvim_lsp = require'lspconfig' + +local on_attach = function(client) + require'completion'.on_attach(client) +end + +nvim_lsp.rust_analyzer.setup({ + on_attach=on_attach, + settings = { + ["rust-analyzer"] = { + imports = { + granularity = { + group = "module", + }, + prefix = "self", + }, + cargo = { + buildScripts = { + enable = true, + }, + }, + procMacro = { + enable = true + }, + } + } +}) +