- Add AI-powered commit message generation with git-ai-commit plugin. - Add diffview for side-by-side git diffs. - Reorganize telescope keymaps (<leader><leader> for live_grep, <leader>/ for find_files). - Update lazy.nvim imports to include plugins.extras. - Add mago.nvim for PHP support. - Update AI plugin with model configuration.
30 lines
1.1 KiB
Lua
30 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)' })
|
|
|
|
|
|
-- 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)' })
|