164 lines
5.3 KiB
Markdown
164 lines
5.3 KiB
Markdown
# Neovim Key Bindings Reference
|
|
|
|
Leader key: `<Space>`
|
|
|
|
## General
|
|
|
|
| Key | Mode | Description |
|
|
|-----|------|-------------|
|
|
| `<Esc>` | Normal | Clear search highlights |
|
|
| `<leader>q` | Normal | Open diagnostic quickfix list |
|
|
| `-` | Normal | Open Oil.nvim file explorer |
|
|
|
|
## Window Navigation
|
|
|
|
| Key | Mode | Description |
|
|
|-----|------|-------------|
|
|
| `<C-h>` | Normal | Move focus to the left window |
|
|
| `<C-l>` | Normal | Move focus to the right window |
|
|
| `<C-j>` | Normal | Move focus to the lower window |
|
|
| `<C-k>` | Normal | Move focus to the upper window |
|
|
|
|
## Terminal
|
|
|
|
| Key | Mode | Description |
|
|
|-----|------|-------------|
|
|
| `<Esc><Esc>` | Terminal | Exit terminal mode |
|
|
|
|
**Note:** There's no built-in keymap to open a terminal. Use these commands:
|
|
- `:terminal` - Open terminal in current window
|
|
- `:split \| terminal` - Open terminal in horizontal split
|
|
- `:vsplit \| terminal` - Open terminal in vertical split
|
|
|
|
## Toggle Commands
|
|
|
|
| Key | Mode | Description |
|
|
|-----|------|-------------|
|
|
| `<leader>ts` | Normal | Toggle spell check |
|
|
| `<leader>tw` | Normal | Toggle word wrap |
|
|
| `<leader>tc` | Normal | Toggle colorcolumn (80 chars) |
|
|
| `<leader>tt` | Normal | Toggle textwidth auto-wrap |
|
|
| `<leader>th` | Normal | Toggle LSP inlay hints (when supported) |
|
|
|
|
## Column Settings
|
|
|
|
| Key | Mode | Description |
|
|
|-----|------|-------------|
|
|
| `<leader>cc` | Normal | Set colorcolumn width (prompts for value) |
|
|
|
|
## Text Editing
|
|
|
|
| Key | Mode | Description |
|
|
|-----|------|-------------|
|
|
| `<C-/>` | Normal | Toggle comment on current line |
|
|
| `<C-/>` | Visual | Toggle comment on selected lines |
|
|
| `<leader>f` | Normal/Visual | Format buffer/selection |
|
|
| `z/` | Normal | Find synonyms for word under cursor (thesaurus) |
|
|
|
|
## Search (Telescope)
|
|
|
|
| Key | Mode | Description |
|
|
|-----|------|-------------|
|
|
| `<leader>sf` | Normal | Search files |
|
|
| `<leader>sg` | Normal | Search by grep (live grep) |
|
|
| `<leader>sw` | Normal | Search current word |
|
|
| `<leader>sh` | Normal | Search help documentation |
|
|
| `<leader>sk` | Normal | Search keymaps |
|
|
| `<leader>ss` | Normal | Search select Telescope pickers |
|
|
| `<leader>sd` | Normal | Search diagnostics |
|
|
| `<leader>sr` | Normal | Resume last search |
|
|
| `<leader>s.` | Normal | Search recent files |
|
|
| `<leader>sn` | Normal | Search Neovim config files |
|
|
| `<leader>s/` | Normal | Search in open files |
|
|
| `<leader>/` | Normal | Fuzzy search in current buffer |
|
|
| `<leader><leader>` | Normal | Find existing buffers |
|
|
|
|
## LSP (Language Server Protocol)
|
|
|
|
These keymaps are only available when an LSP is attached to the buffer.
|
|
|
|
| Key | Mode | Description |
|
|
|-----|------|-------------|
|
|
| `grn` | Normal | Rename symbol |
|
|
| `gra` | Normal/Visual | Code action |
|
|
| `grr` | Normal | Find references |
|
|
| `grd` | Normal | Go to definition |
|
|
| `grD` | Normal | Go to declaration |
|
|
| `gri` | Normal | Go to implementation |
|
|
| `grt` | Normal | Go to type definition |
|
|
| `gO` | Normal | Document symbols |
|
|
| `gW` | Normal | Workspace symbols |
|
|
|
|
**LSP Navigation Tip:** After jumping to a definition with `grd`, press `<C-t>` to jump back.
|
|
|
|
## AI Assistants
|
|
|
|
### Claude Code
|
|
| Key | Mode | Description |
|
|
|-----|------|-------------|
|
|
| `<C-,>` | Normal/Terminal | Toggle Claude Code terminal |
|
|
| `<leader>cC` | Normal | Continue last conversation |
|
|
| `<leader>cV` | Normal | Verbose mode |
|
|
|
|
### GitHub Copilot
|
|
| Key | Mode | Description |
|
|
|-----|------|-------------|
|
|
| `<C-g>` | Insert | Accept Copilot suggestion |
|
|
|
|
**Commands:**
|
|
- `:CopilotChat` - Open Copilot chat
|
|
- `:CopilotChatModels` - View available models
|
|
|
|
## Godot Integration
|
|
|
|
**Commands:**
|
|
- `:GodotDebug` - Start debugging
|
|
- `:GodotBreakAtCursor` - Set breakpoint at cursor
|
|
- `:GodotStep` - Step through debugger
|
|
- `:GodotQuit` - Quit debugger
|
|
- `:GodotContinue` - Continue execution
|
|
|
|
## Plugin Management
|
|
|
|
**Commands:**
|
|
- `:Lazy` - Open lazy.nvim UI
|
|
- `:Lazy update` - Update all plugins
|
|
- `:Lazy sync` - Install missing and update existing plugins
|
|
- `:Lazy clean` - Remove unused plugins
|
|
|
|
## LSP & Tools Management
|
|
|
|
**Commands:**
|
|
- `:Mason` - Open Mason UI to manage LSP servers
|
|
- `:checkhealth` - Run health checks
|
|
- `:checkhealth lsp` - Check LSP configuration
|
|
|
|
## Autocompletion (Blink.cmp)
|
|
|
|
In insert mode during completion:
|
|
|
|
| Key | Description |
|
|
|-----|-------------|
|
|
| `<C-y>` | Accept completion (default preset) |
|
|
| `<Tab>` / `<S-Tab>` | Move to next/previous snippet field |
|
|
| `<C-Space>` | Open menu or toggle documentation |
|
|
| `<C-n>` / `<C-p>` | Select next/previous item |
|
|
| `<Up>` / `<Down>` | Select next/previous item |
|
|
| `<C-e>` | Hide menu |
|
|
| `<C-k>` | Toggle signature help |
|
|
|
|
## Useful Neovim Commands
|
|
|
|
| Command | Description |
|
|
|---------|-------------|
|
|
| `:Tutor` | Interactive Neovim tutorial |
|
|
| `:help` | Open help documentation |
|
|
| `:ConformInfo` | View formatting configuration |
|
|
| `:Thesaurus` | Manual thesaurus lookup |
|
|
|
|
## Tips
|
|
|
|
1. Press `<leader>` and wait briefly to see all available leader key combinations (via which-key)
|
|
2. In Telescope search, press `<C-/>` (insert mode) or `?` (normal mode) to see available keymaps
|
|
3. The colorscheme is Catppuccin Macchiato (change at init.lua:1043)
|
|
4. Format-on-save is enabled by default (except for C/C++)
|