# Neovim Keybinds Documentation This document provides a simple and organized overview of all the custom keybinds defined in my Neovim configuration. ## General Keybinds | Mode | Key | Action | |------|-----------------|---------------------------------------------------------------------------------------------| | `n` | `cd` | Open Ex mode (`:Ex`) | | `n` | `J` | Join lines while keeping the cursor in place | | `n` | `` | Scroll half-page down and keep the cursor centered | | `n` | `` | Scroll half-page up and keep the cursor centered | | `n` | `n` | Move to next search result and keep it centered | | `n` | `N` | Move to previous search result and keep it centered | | `n` | `Q` | Disable Ex mode | | `n` | `` | Jump to next quickfix entry and keep it centered | | `n` | `` | Jump to previous quickfix entry and keep it centered | | `n` | `k` | Jump to next location entry and keep it centered | | `n` | `j` | Jump to previous location entry and keep it centered | | `i` | `` | Exit insert mode (acts like `Esc`) | | `n` | `x` | Make current file executable (`chmod +x`) | | `n` | `u` | Toggle Undotree | | `n` | `rl` | Reload the Neovim config (`~/.config/nvim/init.lua`) | | `n` | `` | Source the current file (`:so`) | --- ## Visual Mode Keybinds | Mode | Key | Action | |------|-----------------|---------------------------------------------------------------------------------------------| | `v` | `J` | Move selected block down | | `v` | `K` | Move selected block up | | `x` | `p` | Paste without overwriting clipboard | | `v` | `y` | Yank into system clipboard (even on SSH) | --- ## Linting and Formatting | Mode | Key | Action | |------|-----------------|---------------------------------------------------------------------------------------------| | `n` | `cc` | Run `php-cs-fixer` to lint and format PHP files | | `n` | `` | Format code (`LSP`) | --- ## Telescope Keybinds | Mode | Key | Action | |------|-----------------|---------------------------------------------------------------------------------------------| | `n` | `ff` | Find files | | `n` | `fg` | Find git-tracked files | | `n` | `fo` | Open recent files | | `n` | `fq` | Open quickfix list | | `n` | `fh` | Open help tags | | `n` | `fb` | Open buffer list | | `n` | `fs` | Grep current string | | `n` | `fc` | Grep instances of the current file name without the extension | | `n` | `fi` | Find files in Neovim configuration directory (`~/.config/nvim/`) | --- ## Harpoon Integration | Mode | Key | Action | |------|-----------------|---------------------------------------------------------------------------------------------| | `n` | `a` | Add current file to Harpoon list | | `n` | `` | Toggle Harpoon quick menu | | `n` | `fl` | Open Harpoon window with Telescope | | `n` | `` | Go to previous Harpoon mark | | `n` | `` | Go to next Harpoon mark | --- ## LSP Keybinds | Mode | Key | Action | |-----------|------------|---------------------------------------------------------------------------------------------| | `n` | `K` | Show hover information | | `n` | `gd` | Go to definition | | `n` | `gD` | Go to declaration | | `n` | `gi` | Go to implementation | | `n` | `go` | Go to type definition | | `n` | `gr` | Show references | | `n` | `gs` | Show signature help | | `n` | `gl` | Show diagnostics in a floating window | | `n` | `` | Rename symbol | | `n`, `x` | `` | Format code asynchronously | | `n` | `` | Show code actions | --- ## Miscellaneous | Mode | Key | Action | |------|-----------------|---------------------------------------------------------------------------------------------| | `n` | `dg` | Run `DogeGenerate` (comment documentation generation) | | `n` | `s` | Replace all instances of the word under the cursor on the current line | --- # LSP servers: I am migrating my lsp config to /lua/plugins/lsp.lua because nvim v0.11 allows a very minimal debloated way to setup language server protocols. Below is a running list of what and how to install the lsp's that are going to be configured in this build. I will avoid mason for now because I think its better to have full control over your system, and not outsource it to mason. Just uncommonet `return {` in /plugins/lsp.lua from the original lspconfig if you want to go that route. 1. { lua-language-server } - refer to distro ( pacman -Ss lua-language-server ) 2. { css-language-server --studio, html-language-server } - npm install -g vscode-langservers-extracted 3. { intelephense } - npm install -g intelephense 4. { typescript-language-server } - npm install -g typescript-language-server typescript