From 9a7a881aaff895bd1208eefa6c65d4ecffaaf25e Mon Sep 17 00:00:00 2001 From: Arnold Sommerfeld Date: Thu, 11 Apr 2024 08:53:20 +0100 Subject: [nvim] Use rustacean instead of bare rust-analyzer --- home/.config/nvim/lua/custom/plugins/init.lua | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'home/.config/nvim/lua/custom/plugins/init.lua') diff --git a/home/.config/nvim/lua/custom/plugins/init.lua b/home/.config/nvim/lua/custom/plugins/init.lua index 784995c..2ee8406 100644 --- a/home/.config/nvim/lua/custom/plugins/init.lua +++ b/home/.config/nvim/lua/custom/plugins/init.lua @@ -931,7 +931,6 @@ return { }, ruff_lsp = {}, pyright = {}, - rust_analyzer = {}, clangd = { cmd = { "clangd", @@ -1045,6 +1044,23 @@ return { }, }, }, + { + 'mrcjkb/rustaceanvim', + config = function() + vim.g.rustaceanvim = { + server = { + on_attach = function(client, bufnr) + require("cfg.lsp").on_attach_wrapper( + client, + bufnr, + { auto_format = true } + ) + end, + }, + } + end, + ft = { 'rust' }, + }, { 'nvim-lualine/lualine.nvim', opts = { -- cgit v1.2.3-70-g09d2