nvim/README.md

57 lines
1.2 KiB
Markdown
Raw Normal View History

# NVIM Configuration
## Plugins
Make sure to fetch plugins as well:
```bash
git submodule update --init
```
## Install / Update
You need couple system-wide packages:
```bash
sudo dnf install -y fzf ripgrep chafa ruff
```
As for JavaScript/TypeScript/Vue:
```bash
yarn global add typescript @vue/typescript-plugin @vue/language-server prettier
```
As for Python/Pyright:
```bash
pip install -U pyright
```
To update TreeSitter parsers, use `:TSUpdateSync<CR>` inside `nvim`.
To add parser for a language you need, use e.g. `:TSInstallSync python<CR>`.
## Shortcuts
File finder:
- `<C-p>` look for files.
- `<C-g>` look for files mentioned by `git status`.
- `<C-/>` look for lines matching given regular expression in any file.
- `<C-\>` switch between open buffers (files).
- `<C-b>` run `nvim` builtin operations.
Language Servers:
- `ca` invoke code action (e.g. add missing import).
- `[d` navigate to previous diagnostic.
- `]d` navigate to following diagnostic.
- `[e` navigate to previous error.
- `]e` navigate to following error.
- `gd` navigate to definition.
- `gD` navigate to declaration.
- `gI` navigate to implementation.
- `gt` navigate to type definition.
- `gh` display signature help (e.g. inside parenthesis).
- `gl` reset diagnostics.