Files
dotfiles/nvim/.config/nvim
2026-11-19 23:07:00 +01:00
..
2026-11-18 19:25:00 +01:00
2026-11-19 23:07:00 +01:00
2026-06-22 14:15:48 +02:00
2026-10-08 23:07:08 +02:00
2026-11-10 12:45:29 +01:00

Neovim config

Inspirations:

Great guide on vim.pack

Micro vim.pack tutorial

  • Remove a plugin :lua vim.pack.del({ 'name' }).
  • Update a plugin :lua vim.pack.update({ 'name' })
  • Update all :lua vim.pack.update()

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
  • <leader>tf — toggle auto formatting on save

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:

  • lsp restart restart LSP clients attached to the current buffer
  • 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
  • <C-x><C-n> manually word completion

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