aboutsummaryrefslogtreecommitdiffstats
path: root/lua/simenandre/remap.lua
diff options
context:
space:
mode:
authorSimen A. W. Olsen <hello@simenandre.no>2026-10-08 10:02:43 +0200
committerSimen A. W. Olsen <hello@simenandre.no>2026-10-08 10:02:43 +0200
commitd85d183b35f69c74e1bc5f23fe43c787497f398c (patch)
tree90eea60c7c54dd407b2fba35c1199f066545bf44 /lua/simenandre/remap.lua
parentb6dda087fc86e78e589785a65c61fca23dc383f0 (diff)
downloadconfig.nvim-d85d183b35f69c74e1bc5f23fe43c787497f398c.tar.gz
config.nvim-d85d183b35f69c74e1bc5f23fe43c787497f398c.zip
fix: migrate treesitter to main branch and tidy configHEADmain
nvim-treesitter master is archived and its queries crash on Neovim 0.12. Move lazy-lock.json to stdpath(state) since the config dir is read-only.
Diffstat (limited to 'lua/simenandre/remap.lua')
-rw-r--r--lua/simenandre/remap.lua11
1 files changed, 1 insertions, 10 deletions
diff --git a/lua/simenandre/remap.lua b/lua/simenandre/remap.lua
index ce91aa3..2c66c58 100644
--- a/lua/simenandre/remap.lua
+++ b/lua/simenandre/remap.lua
@@ -1,7 +1,6 @@
-- See `:help vim.keymap.set()`
vim.keymap.set("i", "<C-c>", "<Esc>")
-vim.keymap.set("n", "<leader>f", vim.lsp.buf.format)
vim.keymap.set("v", "J", ":m '>+1<CR>gv=gv")
vim.keymap.set("v", "K", ":m '<-2<CR>gv=gv")
@@ -13,19 +12,11 @@ vim.keymap.set("n", "<C-u>", "<C-u>zz")
vim.opt.hlsearch = true
vim.keymap.set("n", "<Esc>", "<cmd>nohlsearch<CR>")
--- 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" })
+-- Diagnostic keymaps ([d and ]d are Neovim defaults)
vim.keymap.set("n", "<leader>e", vim.diagnostic.open_float, { desc = "Show diagnostic [E]rror messages" })
vim.keymap.set("n", "<leader>q", vim.diagnostic.setloclist, { desc = "Open diagnostic [Q]uickfix list" })
-- Exit terminal mode
vim.keymap.set("t", "<Esc><Esc>", "<C-\\><C-n>", { desc = "Exit terminal mode" })
--- Keybinds to make split navigation easier.
-vim.keymap.set("n", "<C-h>", "<C-w><C-h>", { desc = "Move focus to the left window" })
-vim.keymap.set("n", "<C-l>", "<C-w><C-l>", { desc = "Move focus to the right window" })
-vim.keymap.set("n", "<C-j>", "<C-w><C-j>", { desc = "Move focus to the lower window" })
-vim.keymap.set("n", "<C-k>", "<C-w><C-k>", { desc = "Move focus to the upper window" })
-
vim.keymap.set("n", "<leader>pv", vim.cmd.Ex)