From 19c2b2e8bb457346b2b39d4e9e0fced85b4ebf5b Mon Sep 17 00:00:00 2001 From: Kyren223 Date: Thu, 1 May 2025 14:08:52 +0300 Subject: Deleted a bunch of unneeded files --- .config/nvim/lua/plugins/rustaceanvim.lua | 38 ++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) (limited to '.config/nvim/lua/plugins/rustaceanvim.lua') diff --git a/.config/nvim/lua/plugins/rustaceanvim.lua b/.config/nvim/lua/plugins/rustaceanvim.lua index 564e046..59f1717 100644 --- a/.config/nvim/lua/plugins/rustaceanvim.lua +++ b/.config/nvim/lua/plugins/rustaceanvim.lua @@ -3,6 +3,42 @@ return { version = '^5', lazy = false, -- already lazy init = function() - require('rustaceanvim') + ---@type RustaceanOpts + vim.g.rustaceanvim = { + ---@type RustaceanToolsOpts + tools = { + float_win_config = { + border = 'rounded', + }, + }, + ---@type RustaceanLspClientOpts + server = { + on_attach = function(_, bufnr) + local keymaps = { + { { 'n', 'i' }, '', 'RustLsp codeAction', { desc = 'Code Action' } }, + } + + for _, keymap in ipairs(keymaps) do + local modes = keymap[1] + local lhs = keymap[2] + local rhs = keymap[3] + local opts = keymap[4] + opts.buffer = bufnr + + vim.keymap.set(modes, lhs, rhs, opts) + end + end, + default_settings = { + ['rust-analyzer'] = { + semanticHighlighting = { + operator = { specialization = { enable = true } }, + punctuation = { enable = true, specialization = { enable = true } }, + }, + }, + }, + }, + ---@type RustaceanDapOpts + dap = {}, + } end, } -- cgit v1.3.1