From dfb342da4ebee21f29fa0713be5e61123a0cf36f Mon Sep 17 00:00:00 2001 From: "Simen A. W. Olsen" Date: Sat, 21 Mar 2026 13:42:12 +0100 Subject: refactor: restructure LSP configuration and modernize plugins MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Split LSP server configs into separate files in lsp/ directory - Replace deprecated vim.loop with vim.uv API - Update copilot plugin (copilot.vim → copilot.lua) - Add snacks.nvim plugin for utilities - Simplify LSP setup using new Neovim 0.11+ APIs - Remove hardcoded paths in favor of vim.fs.joinpath - Clean up configuration and remove duplicate keybindings - Remove comment.lua plugin --- lua/simenandre/remap.lua | 63 ++---------------------------------------------- 1 file changed, 2 insertions(+), 61 deletions(-) (limited to 'lua/simenandre/remap.lua') diff --git a/lua/simenandre/remap.lua b/lua/simenandre/remap.lua index a2fb673..ce91aa3 100644 --- a/lua/simenandre/remap.lua +++ b/lua/simenandre/remap.lua @@ -19,72 +19,13 @@ vim.keymap.set("n", "]d", vim.diagnostic.goto_next, { desc = "Go to next [D]iagn vim.keymap.set("n", "e", vim.diagnostic.open_float, { desc = "Show diagnostic [E]rror messages" }) vim.keymap.set("n", "q", vim.diagnostic.setloclist, { desc = "Open diagnostic [Q]uickfix list" }) --- Exit terminal mode in the builtin terminal with a shortcut that is a bit easier --- for people to discover. Otherwise, you normally need to press , which --- is not what someone will guess without a bit more experience. --- --- NOTE: This won't work in all terminal emulators/tmux/etc. Try your own mapping --- or just use to exit terminal mode +-- Exit terminal mode vim.keymap.set("t", "", "", { desc = "Exit terminal mode" }) ---- I can't stop! -vim.keymap.set("n", "", 'echo "Use h to move!!"') -vim.keymap.set("n", "", 'echo "Use l to move!!"') -vim.keymap.set("n", "", 'echo "Use k to move!!"') -vim.keymap.set("n", "", 'echo "Use j to move!!"') - --- Keybinds to make split navigation easier. --- Use CTRL+ to switch between windows --- --- See `:help wincmd` for a list of all window commands -vim.keymap.set("n", "", "", { desc = "Move focus to the left window" }) -vim.keymap.set("n", "", "", { desc = "Move focus to the right window" }) -vim.keymap.set("n", "", "", { desc = "Move focus to the lower window" }) - --- See `:help vim.keymap.set()` - -vim.keymap.set("i", "", "") -vim.keymap.set("n", "f", vim.lsp.buf.format) - -vim.keymap.set("n", "pv", vim.cmd.Ex) - -vim.keymap.set("v", "J", ":m '>+1gv=gv") -vim.keymap.set("v", "K", ":m '<-2gv=gv") - -vim.keymap.set("n", "", "zz") -vim.keymap.set("n", "", "zz") - --- Set highlight on search, but clear on pressing in normal mode -vim.opt.hlsearch = true -vim.keymap.set("n", "", "nohlsearch") - --- Diagnostic keymaps -vim.keymap.set("n", "[d", vim.diagnostic.goto_prev, { desc = "Go to previous [D]iagnostic message" }) -vim.keymap.set("n", "]d", vim.diagnostic.goto_next, { desc = "Go to next [D]iagnostic message" }) -vim.keymap.set("n", "e", vim.diagnostic.open_float, { desc = "Show diagnostic [E]rror messages" }) -vim.keymap.set("n", "q", vim.diagnostic.setloclist, { desc = "Open diagnostic [Q]uickfix list" }) - --- Exit terminal mode in the builtin terminal with a shortcut that is a bit easier --- for people to discover. Otherwise, you normally need to press , which --- is not what someone will guess without a bit more experience. --- --- NOTE: This won't work in all terminal emulators/tmux/etc. Try your own mapping --- or just use to exit terminal mode -vim.keymap.set("t", "", "", { desc = "Exit terminal mode" }) - ---- I can't stop! -vim.keymap.set("n", "", 'echo "Use h to move!!"') -vim.keymap.set("n", "", 'echo "Use l to move!!"') -vim.keymap.set("n", "", 'echo "Use k to move!!"') -vim.keymap.set("n", "", 'echo "Use j to move!!"') - -- Keybinds to make split navigation easier. --- Use CTRL+ to switch between windows --- --- See `:help wincmd` for a list of all window commands vim.keymap.set("n", "", "", { desc = "Move focus to the left window" }) vim.keymap.set("n", "", "", { desc = "Move focus to the right window" }) vim.keymap.set("n", "", "", { desc = "Move focus to the lower window" }) vim.keymap.set("n", "", "", { desc = "Move focus to the upper window" }) -vim.keymap.set("n", "", "", { desc = "Move focus to the upper window" }) +vim.keymap.set("n", "pv", vim.cmd.Ex) -- cgit v1.3.1