From 00da33f238b7e2917753879edfef0728db6263cc Mon Sep 17 00:00:00 2001 From: Hippolyte Chauvin Date: Sun, 15 Oct 2023 16:13:08 +0200 Subject: [PATCH] Remaniement : configuration de rust-analyzer dans un module de lsp --- config/nvim/lua/core/lsp.lua | 23 ---------------------- config/nvim/lua/core/lsp/rust_analyzer.lua | 21 ++++++++++++++++++++ 2 files changed, 21 insertions(+), 23 deletions(-) diff --git a/config/nvim/lua/core/lsp.lua b/config/nvim/lua/core/lsp.lua index 43936f7..34312d4 100644 --- a/config/nvim/lua/core/lsp.lua +++ b/config/nvim/lua/core/lsp.lua @@ -3,26 +3,3 @@ 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 - }, - } - } -}) - diff --git a/config/nvim/lua/core/lsp/rust_analyzer.lua b/config/nvim/lua/core/lsp/rust_analyzer.lua index e69de29..a664667 100644 --- a/config/nvim/lua/core/lsp/rust_analyzer.lua +++ b/config/nvim/lua/core/lsp/rust_analyzer.lua @@ -0,0 +1,21 @@ +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 + }, + } + } +})