This is my personal Neovim configuration, largely based on the How I Setup Neovim To Make It AMAZING in 2024: The Ultimate Guide. Huge thanks to the creator for sharing their detailed setup!
<leader>hD→ Diff this (from two different sources, check your config)<leader>hd→ Diff this<leader>hB→ Toggle line blame<leader>hb→ Blame line<leader>hp→ Preview hunk<leader>hu→ Undo stage hunk<leader>hR→ Reset buffer<leader>hS→ Stage buffer<leader>hr(Visual) → Reset hunk<leader>hs(Visual) → Stage hunk<leader>hr→ Reset hunk<leader>hs→ Stage hunk<leader>gl→ GitGraph - Draw<leader>gn→ Open neogit[h→ Prev Hunk]h→ Next Hunkih(Visual/Operator-pending) → Gitsigns select hunk
<leader>rs→ Restart LSP<leader>d→ Show line diagnostics<leader>D→ Show buffer diagnostics<leader>rn→ Smart rename<leader>ca(Visual/Normal) → See available code actionsK→ Show documentation for what is under cursor[d→ Go to previous diagnostic]d→ Go to next diagnosticgt→ Show LSP type definitionsgi→ Show LSP implementationsgd→ Show LSP definitionsgD→ Go to declarationgR→ Show LSP references<C-W><C-D>/<C-W>d→ Show diagnostics under the cursor
<leader>ft→ Find todos<leader>fc→ Find string under cursor in cwd<leader>fs→ Find string in cwd<leader>fr→ Fuzzy find recent files<leader>ff→ Fuzzy find files in cwd<leader>fn→ Find noice messages<leader>fp→ Find project
<leader>xt→ Open todos in trouble<leader>xl→ Open trouble location list<leader>xq→ Open trouble quickfix list<leader>xd→ Open trouble document diagnostics<leader>xw→ Open trouble workspace diagnostics
<leader>ef→ Focus on NvimTree or toggle on current file<leader>ee→ Toggle file explorer<leader>er→ Refresh file explorer<leader>ec→ Collapse file explorer<leader>tv→ Open vertical terminal<leader>do→ Toggle Diffview window<leader>dv→ Toggle Diffview Files<leader>df→ File History (Current File)<leader>sm→ Maximize/minimize a split<leader>sx→ Close current split<leader>se→ Make splits equal size<leader>sh→ Split window horizontally<leader>sv→ Split window vertically
<leader>b<number>→ Switch to buffer<leader>bn→ Go to next buffer<leader>bp→ Go to previous buffer<leader>q→ Close buffer<leader>p→ Pin buffer<leader>bq→ Close buffer include pin<leader>tn→ Go to next tab<leader>tp→ Go to previous tab<leader>to→ Open new tab<leader>tx→ Close current tab<leader>tn→ Go to next tab<leader>tp→ Go to previous tab<leader>tf→ Open current buffer in new tab
<leader>mp(Visual/Normal) → Format file or range<leader>l→ Trigger linting for current file<leader>ws→ Save session for auto session root dir<leader>wr→ Restore session for cwd<leader>z→ Toggle wrap<leader>nh→ Clear search highlights
<C-leader>(Normal) → Start selecting nodes with nvim-treesitter<BS>(Visual) → Shrink selection to previous named node<C-leader>(Visual) → Increment selection to named node
[t→ Previous todo comment]t→ Next todo comment
| Plugin | Description |
|---|---|
| alpha.nvim | Fast and customizable start screen for Neovim. |
| auto-session | Automatically saves and restores Neovim sessions. |
| autopairs | Automatically pairs parentheses, brackets, quotes, etc. |
| bufferline.nvim | Manages buffers with a visual tabline. |
| colorscheme | Various color schemes to customize Neovim's appearance. |
| comment.nvim | Easily comments and uncomments code. |
| copilot.vim | GitHub Copilot integration. |
| diffview.nvim | Views Git diffs inside Neovim. |
| dressing.nvim | Enhances Neovim's built-in UI elements like input boxes and menus. |
| formatter.nvim | Easily formats code using external formatters. |
| gitgraph.nvim | Shows Git commit history in a graphical format. |
| gitsigns.nvim | Git integration, shows line-level Git changes. |
| im-select | Manages input method selection on macOS/Linux. |
| indent-blankline.nvim | Visually displays indentation levels with blank lines. |
| lspconfig | Configuration for Neovim's built-in LSP client. |
| mason.nvim | Manages external tools like LSP servers and linters in Neovim. |
| lualine.nvim | Fast and customizable statusline for Neovim. |
| neogit | Git integration plugin with a user-friendly interface. |
| noice.nvim | Improves Neovim's UI for messages and notifications. |
| nvim-cmp | Completion plugin that supports many sources. |
| nvim-tree.lua | File manager inspired by NERDTree. |
| surround.nvim | Easily adds, deletes, and changes surrounding characters in text. |
| telescope.nvim | Highly extendable fuzzy finder. |
| terminal.nvim | Manages Neovim integrated terminal. |
| todo-comments.nvim | Highlights and searches TODO, FIXME, and other comment tags. |
| treesitter.nvim | Enhances syntax highlighting and code parsing using Tree-sitter. |
| trouble.nvim | Displays diagnostics, references, and other information in a popup. |
| vim-maximizer | Toggles Neovim window maximization and restoration. |
| which-key.nvim | Shows key bindings in a popup to help learn shortcuts. |
| project.nvim | Project management for Neovim. |
| mdx.nvim | Markdown previewer for Neovim. |
| oil.nvim | Eazy to Edit filesystem. |