2.1 KiB
2.1 KiB
romanzy neovim config
Inspirations:
Neovim Notes
Splits
Horizontal split:
:sp
Vertical split:
:vs
Open a file in a horizontal split:
:sp path/to/file
Open a file in a vertical split:
:vs path/to/file
Browse files with:
<leader>dl
Oil usage:
<leader>dlopens the parent directory of the current file<CR>opens a file or enters a directory-goes to the parent directory<BS>also goes to the parent directory<A-h>also goes to the parent directory<A-l>opens the selected file or enters the selected directory<C-p>previews the selected entry in a right-hand vertical split- edit the Oil buffer, then
:wto apply file operations - hidden files are shown, but
.gitstays hidden
Open netrw explicitly with:
<leader>nl
:Ex
Window Navigation
Move between windows with:
<C-h> left
<C-j> down
<C-k> up
<C-l> right
Cycle through windows:
<C-w>w
Terminal
Open a terminal in the current window:
:term
Open a terminal in a horizontal split:
:sp | term
Open a terminal in a vertical split:
:vs | term
Leave terminal mode and return to normal mode:
<Esc>
LSP
When an LSP server is attached to the current buffer:
gdgo to definitiongDgo to declarationgrdlist referencesgrnrename symbol<C-Space>trigger completion
Diagnostics:
g.open diagnostic floatglsend diagnostics to the location listg]jump to next errorg[jump to previous error
Tree-sitter
Tree-sitter is managed with nvim-treesitter via vim.pack.
Installing missing parsers requires the external tools from the upstream README:
tarcurltree-sitter-cli- a C compiler
If tree-sitter is on your PATH, startup will try to install the configured parsers if they are missing.
Useful commands:
:TSUpdate
:TSInstall lua bash json
:TSInstallInfo
:InspectTree
:checkhealth vim.treesitter