From 70a1687c7487bbe7397d1db71e04f4cb2380fc27 Mon Sep 17 00:00:00 2001 From: Oxbian Date: Thu, 29 Jun 2023 23:07:21 +0200 Subject: Updating lsp settings & documentation --- readme.md | 98 +++++++++++++++++++++++++++++++++++++++++++++------------------ 1 file changed, 70 insertions(+), 28 deletions(-) (limited to 'readme.md') diff --git a/readme.md b/readme.md index e4457a7..f2ca3d5 100644 --- a/readme.md +++ b/readme.md @@ -1,62 +1,104 @@ # VIM -This repo contains my vim configuration, hope it will be usefull for you. +This repo contains my vim configuration, hope it will be useful for you. -## Installation +## Installation -You will need `vim` and `git` to be able to use this config. +You will need `vim` and `git` to be able to use this configuration. -Normally if you run the `install.sh` script it will work, but if you have a problem, try to install vim plug and check if your problem is solved. +Normally if you run the `install.sh` script it will work, but if you have a problem, try to install vim plug and check if your problem is solved. ```bash curl -fLo ~/.vim/autoload/plug.vim --create-dirs \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim ``` -Oh and remove neovim, it make some problems with vim. +Oh and remove neovim, it make some problems with vim. ## Plugins -This config has just the necessarry plugins installed: -- [OneDark](https://github.com/joshdick/onedark.vim) onedark theme. -- [Vim Airline](https://github.com/vim-airline/vim-airline) Vim statusline. -- [NerdTree](https://github.com/preservim/nerdtree) to have a filetree in vim. -- [Vim devicons](https://github.com/ryanoasis/vim-devicons) language icons for vim. - [Vim gitgutter](https://github.com/airblade/vim-gitgutter) to see diff between files with git. -- [Vim fugitive](https://github.com/tpope/vim-fugitive) to be able to use some powerful git commands in git. -- [ALE](https://github.com/dense-analysis/ale) vim linter, autocompleter, a swiss knife for all the LSP things. -- [Vim vsnip](https://github.com/hrsh7th/vim-vsnip/tree/master) vscode snippets for vim. -- [Vim friendly snippets](https://github.com/rafamadriz/friendly-snippets) vim snippets collection in vscode format. +This config has just the necessary plugins installed: +- [OneDark](https://github.com/joshdick/onedark.vim) onedark theme. +- [Vim Airline](https://github.com/vim-airline/vim-airline) Vim statusline. +- [NerdTree](https://github.com/preservim/nerdtree) to have a file tree in vim. +- [Vim devicons](https://github.com/ryanoasis/vim-devicons) language icons for vim. +- [Vim nerdtree syntax highlighting](https://github.com/tiagofumo/vim-nerdtree-syntax-highlight) nerdtree syntax highlighting +- [Vim gitgutter](https://github.com/airblade/vim-gitgutter) to see diff between files with git. +- [Vim LSP](https://github.com/prabirshrestha/vim-lsp) to add LSP +- [Vim LSP settings](https://github.com/mattn/vim-lsp-settings) auto configuration for installing LSP-server +- [Asyncomplete](https://github.com/prabirshrestha/asyncomplete.vim) async autocompletion +- [Asyncomplete lsp](https://github.com/prabirshrestha/asyncomplete-lsp.vim) LSP server for asyncomplete & vim-lsp ## Command & keybinds ### General -- `Ctrl+h` move to the left window +- `hl` remove highlighting + +#### Window + +- `Ctrl+h` move to the left window - `Ctrl+j` move to the bottom window - `Ctrl+k` move to the upper window - `Ctrl+l` move to the right window -- `h` remove highligthing + +#### Buffer + +- `bd` close the current buffer +- `ba` close all the buffers +- `l` go to the next buffer +- `h` go to the precedent buffer + +#### Tabs + +- `tn` open a new tab +- `to` close all other tabs +- `tc` close current tab page +- `tm` move the tab after another +- `t` go to the next tab +- `tl` toggle between this tab and the last accessed tab +- `te` open a new tab with the current buffer + +#### Spell check + +- `ss` toggle / untoggle spellchecking +- `sn` go to the next word to spellcheck +- `sp` go to the previous word to spellcheck +- `sa` add a word into the dictionary +- `s?` show the list of alternatives for the word + +More help at `:help spell` ### NerdTree -For help, use `:help NERDTree`. +For help, use `:help NERDTree`. Keybinds: -- `Ctrl+f` open or close the nerdtree window +- `Ctrl+f` open or close the nerdtree window -### Vim Gutter +### Vim Gutter -For help, use `:help gitgutter`. -Keybinds: -- `[c` & `]c` to jump between hunks, -- `hp` to preview hunk, -- `hs` to stage hunk, -- `hu` to undo hunk, -- `d` to toggle GitGutter. +For help, use `:help gitgutter`. +Keybinds: +- `[c` & `]c` to jump between hunks, +- `hp` to preview hunk, +- `hs` to stage hunk, +- `hu` to undo hunk, +- `d` to toggle GitGutter. Hunks are the difference between your file and the git file. ### Vim Fugitive -For help, use `:help fugitive`. +For help, use `:help fugitive`. + +## Linters & fixers + +### Python +For using python linters & fixers, you will need to setup a virtual env & install the linters & fixers. + +```bash +python -m venv .venv +source .venv/bin/activate +pip install flake8 pylint pydocstyle bandit mypy black isort +``` -- cgit v1.2.3