Files
dotfiles/nvim/.config/nvim/README.md
T
2026-09-29 21:35:52 +02:00

2.9 KiB

romanzy neovim config

Inspirations:

Great guide on vim.pack

To remove a plugin run :lua vim.pack.del({ "<plugin name>" }).

Neovim Notes

See custom keymaps with short descriptions with <leader><leader>h.

General shortcuts:

  • <leader>e opens the file browser
  • gx opens an external viewer
  • gR, <F5> refresh

Windowing shortcuts:

  • <leader>sv open a vertical split
  • <leader>sh open a horizontal split
  • <leader>se equalize split sizes
  • <leader>sc close the current window
  • <leader>r-hjkl to resize
  • <leader>re equalize split sizes
  • <C-hjkl> move between windows

Buffer shortcuts:

  • <leader>bp previous buffer
  • <leader>bn next buffer
  • <leader>bd delete the current buffer
  • <leader>bc force close all non-visible buffers
  • <leader>bf find buffers

Telescope shortcuts:

  • <leader>ff find files
  • <leader>fg live grep
  • <leader>fb list buffers
  • <leader>fh browse help tags

Git shortcuts:

  • :Git to run commands directly (:Git status, :Git log --oneline)
  • <leader>lg open LazyGit
  • <leader>dv open Diffview
  • <leader>dc close Diffview
  • [h, ]h, [H, ]H jump to hunks
  • <leader>th — toggle the expanded hunk view

Oil usage:

  • -, <BS> goes to the parent directory
  • <C-p> previews the selected entry

Toggle shortcuts:

  • <leader>tw toggle soft wrap
  • <leader>ts toggle spell checking
  • <leader>ti toggle inline diagnostics
  • <leader>tv toggle virtual diagnostics
  • <leader>th — toggle the expanded hunk view

Terminal

Two options to leave terminal mode and return to normal mode:

<\\-Esc>

<C-Esc>

LSP

Useful Mason commands:

:Mason
:MasonLog
:checkhealth mason

Useful LSP commands:

  • K show the type and documentation for the symbol under the cursor
  • gd go to definition
  • gD go to declaration
  • grd list references
  • grn rename symbol
  • <leader>ca show code actions
  • <leader>cf apply quick fixes
  • <leader>cs show source actions

Diagnostics:

  • g. open diagnostic float
  • gl send diagnostics to the location list
  • gld display diagnostic information
  • ]g, [g jump to warning or error
  • <leader>ti toggle inline diagnostics
  • <leader>tv toggle virtual diagnostics
  • <leader>xx, :ProjectDiagnostics check the current Dart or TypeScript package and show warnings and errors in Trouble. Save modified package files first. Other languages show available LSP diagnostics; project coverage depends on the language server.

Tree-sitter

tree-sitter-cli and a C compiler is required to be installed.

Useful commands:

:TSUpdate
:TSInstall lua bash json
:TSInstallInfo
:InspectTree
:checkhealth vim.treesitter