Add README.md and make it user independent
This commit is contained in:
parent
f0cf763b36
commit
5134f16c12
3 changed files with 75 additions and 4 deletions
69
README.md
Normal file
69
README.md
Normal file
|
@ -0,0 +1,69 @@
|
|||
# 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.
|
|
@ -100,13 +100,15 @@ vim.keymap.set("n", "gl", "<cmd>lua vim.diagnostic.reset()<CR>", { noremap = tru
|
|||
vim.lsp.enable("pyright")
|
||||
vim.lsp.config("pyright", {})
|
||||
|
||||
local yarn_path = vim.fn.expand("$HOME/.config/yarn/global/node_modules")
|
||||
|
||||
vim.lsp.enable("ts_ls")
|
||||
vim.lsp.config("ts_ls", {
|
||||
init_options = {
|
||||
plugins = {
|
||||
{
|
||||
name = "@vue/typescript-plugin",
|
||||
location = "/home/mordae/.config/yarn/global/node_modules/@vue/typescript-plugin",
|
||||
location = yarn_path .. "/@vue/typescript-plugin",
|
||||
languages = { "javascript", "typescript", "vue" },
|
||||
},
|
||||
},
|
||||
|
@ -122,7 +124,7 @@ vim.lsp.enable("volar")
|
|||
vim.lsp.config("volar", {
|
||||
init_options = {
|
||||
typescript = {
|
||||
tsdk = "/home/mordae/.config/yarn/global/node_modules/typescript/lib",
|
||||
tsdk = yarn_path .. "/typescript/lib",
|
||||
}
|
||||
}
|
||||
})
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
-- |
|
||||
-- Module :
|
||||
-- Copyright : Jan Hamal Dvořák
|
||||
-- Copyright :
|
||||
-- License : MIT
|
||||
--
|
||||
-- Maintainer : mordae@anilinux.org
|
||||
-- Maintainer :
|
||||
-- Stability : unstable
|
||||
-- Portability : non-portable (ghc)
|
||||
--
|
||||
|
|
Loading…
Reference in a new issue