Files
nvim/lua/config/keymaps.lua
zias 6ec8190beb refactor: modularize nvim config into lua/config + lua/plugins
- Extract all options, keymaps, and autocommands into lua/config/
- Move every plugin spec into its own file under lua/plugins/
- Add custom inline orng colorscheme (dark + light) synced to macOS appearance
- Consolidate image.nvim into pdf-viewer.lua (fix duplicate spec)
- Fix image.nvim processor: magick -> magick_cli
- Remove conflicting nvim-autopairs (kept mini.pairs)
- Fix broken <C-f> keymap (was calling non-existent builtin cmd)
- Delete lua/kickstart/ and lua/custom/ folders
- Add colors/orng.vim + colors/orng-light.vim stubs for mid-session switching
- init.lua reduced from 1078 lines to 49 lines
2026-02-26 11:54:58 +01:00

32 lines
1.1 KiB
Lua

-- lua/config/keymaps.lua
-- Global keymaps (plugin keymaps live in their own plugin files)
local map = vim.keymap.set
-- Clear search highlights
map('n', '<Esc>', '<cmd>nohlsearch<CR>')
-- Diagnostics
map('n', '<leader>q', vim.diagnostic.setloclist, { desc = 'Open diagnostic [Q]uickfix list' })
-- Terminal
map('t', '<Esc><Esc>', '<C-\\><C-n>', { desc = 'Exit terminal mode' })
map('n', '<C-t>', ':split | terminal<CR>', { desc = '[T]erminal (horizontal split)' })
-- Window navigation
map('n', '<C-h>', '<C-w><C-h>', { desc = 'Move focus to the left window' })
map('n', '<C-l>', '<C-w><C-l>', { desc = 'Move focus to the right window' })
map('n', '<C-j>', '<C-w><C-j>', { desc = 'Move focus to the lower window' })
map('n', '<C-k>', '<C-w><C-k>', { desc = 'Move focus to the upper window' })
-- File explorer
map('n', '<C-e>', ':Neotree toggle<CR>', { desc = '[E]xplorer (toggle neotree)' })
-- LazyGit
map('n', '<C-g>', '<cmd>LazyGit<CR>', { desc = 'LazyGit' })
-- Telescope live grep (fixed: was using broken <cmd>builtin... syntax)
map('n', '<C-f>', function()
require('telescope.builtin').live_grep()
end, { desc = '[F]ind (live grep all files)' })