<Space> as the leader key. Keymaps are defined in multiple locations based on their scope and purpose.
Keymap organization
Keymaps in this configuration are organized into three categories:- Global keymaps - Defined in
lua/config/keymaps.luafor universal operations - LSP keymaps - Buffer-local keymaps set in
lua/plugins/lsp/init.luawhen LSP attaches - Plugin keymaps - Defined within individual plugin configuration files
Leader key configuration
The leader key is set to<Space> at the very beginning of initialization:
init.lua:2-3
The leader key must be set before lazy.nvim loads to ensure all plugin keymaps use the correct leader.
Global keymaps
Editing operations
| Key | Mode | Description |
|---|---|---|
J | visual | Move selected lines down |
K | visual | Move selected lines up |
< | visual | Indent left (stays in visual mode) |
> | visual | Indent right (stays in visual mode) |
X | normal | Split line at cursor position |
d | normal, visual | Delete without copying to clipboard |
D | normal, visual | Delete to end of line without copying |
Navigation shortcuts
| Key | Mode | Description |
|---|---|---|
H | normal, visual, operator | Jump to start of line (^) |
L | normal, visual, operator | Jump to end of line (g_) |
<Left> | normal | Previous buffer |
<Right> | normal | Next buffer |
Centered search navigation
All search operations keep results centered for better visibility:| Key | Mode | Description |
|---|---|---|
n | normal | Next match (centered) |
N | normal | Previous match (centered) |
* | normal | Search word under cursor (centered) |
# | normal | Search word backward (centered) |
g* | normal | Search partial word (centered) |
g# | normal | Search partial word backward (centered) |
lua/config/keymaps.lua:25-31
Lua execution
Execute Lua code directly in Neovim:| Key | Mode | Description |
|---|---|---|
<leader>rc | normal | Source current file |
<leader>x | normal | Execute current line as Lua |
<leader>x | visual | Execute selection as Lua |
Quickfix and diagnostics
| Key | Mode | Description |
|---|---|---|
<M-j> | normal | Next quickfix item |
<M-k> | normal | Previous quickfix item |
<M-q> | normal | Open quickfix list |
<leader>q | normal | Open diagnostic quickfix list |
<leader>de | normal | Show diagnostic error messages in float |
Utility keymaps
Line numbers in visual mode
Get highlighted line numbers when selecting code:lua/config/keymaps.lua:33-39
File path copying
Copy the current file path with line number:lua/config/keymaps.lua:136-138
Link opening
Open URLs or file paths under cursor:lua/config/keymaps.lua:64-71
Terminal mode
| Key | Mode | Description |
|---|---|---|
<Esc><Esc> | terminal | Exit terminal mode to normal mode |
Window management
Floating window focus
Jump into floating windows (diagnostic floats, hover windows, etc.):lua/config/keymaps.lua:91-100
Code actions
Tiny code action
Enhanced code action UI:lua/config/keymaps.lua:114-116
Code lens
Run available code lens actions:lua/config/keymaps.lua:119
Call hierarchy
LSP call hierarchy navigation:lua/config/keymaps.lua:122-134
Diagnostic yank
Copy diagnostic message under cursor to clipboard:lua/config/keymaps.lua:74-88
Disabled keymaps
Command-line window (q:)
The command-line window is disabled to prevent accidental activation:lua/config/keymaps.lua:141-143
Customization
For complete keymap references organized by feature, see:General keymaps
Editing, navigation, and utility keymaps
LSP keymaps
Language server protocol keybindings
Git keymaps
Git operations and version control
Navigation keymaps
File and buffer navigation
Adding custom keymaps
To add your own keymaps, editlua/config/keymaps.lua:
lua/config/keymaps.lua
Always provide a descriptive
desc field for keymaps. This makes them discoverable in which-key (<leader>?) and helps with documentation.lua/plugins/. For LSP keymaps, modify the setup_keymaps() function in lua/plugins/lsp/init.lua.