nvim/README.md

70 lines
1.3 KiB
Markdown
Raw Permalink Normal View History

# NVIM Configuration
## Plugins
Make sure to fetch plugins as well:
```bash
git submodule update --init
```
## Install / Update
For the addons:
```bash
sudo dnf install -y fzf ripgrep chafa
```
For Python:
```bash
sudo dnf install -y ruff
pip install -U pyright
```
For C/C++:
```bash
sudo dnf install -y clang-tools-extra
```
For JavaScript/TypeScript/Vue:
```bash
yarn global add typescript @vue/typescript-plugin @vue/language-server prettier
```
For Rust:
```
sudo dnf install -y rust-analyzer
```
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.