diff --git a/README.md b/README.md index 0f41670..e3f1e79 100644 --- a/README.md +++ b/README.md @@ -9,8 +9,6 @@ Those repos are obviously listed in plugin setup part. # Basic usage of this config -Repo: [https://github.com/Szwendacz99/nvim](https://github.com/Szwendacz99/nvim) - ### First Time Setup Installing system stuff (Fedora example): @@ -20,61 +18,45 @@ sudo dnf install \ neovim \ ripgrep \ fd-find \ - nodejs-bash-language-server \ + npm \ tree-sitter-cli \ wl-clipboard \ - unifont-fonts.noarch + dejavu-fonts-all-2.37-18.fc36.noarch pip install \ pynvim \ - 'pylama[all]' \ + 'python-lsp-server[all]' \ flake8 \ - jedi \ - bandit \ - yapf \ - rope + sh -c 'curl -fLo "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug.vim --create-dirs \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim' ``` -##### +##### + ##### Inside vim ``` :PlugInstall -:CocInstall coc-git coc-pyright coc-sh coc-json coc-css coc-tsserver coc-eslint coc-prettier coc-snippets coc-yaml ``` -On Fedora there is need to make sure your system can display any unicode character. Hacked fonts are needed for filetype icons but there is also need for a dedicated package with unicode fonts (like unifont-fonts.noarch) that will have every character missing from default font used in Neovim editor. Link to gacked fonts: +On Fedora there is need to make sure your system can display any unicode character. Hacked fonts are needed for filetype icons but there is also need for a dedicated package with unicode fonts (like unifont-fonts.noarch) that will have every character missing from default font used in Neovim editor. Link to hacked fonts: [https://www.nerdfonts.com/font-downloads](https://www.nerdfonts.com/font-downloads) -##### Optional stuff - -perl very basic lsp server: - -```bash -# Install perl module manager -sudo dnf install perl-App-cpanminus - -# install language server module -sudo cpanm PLS - -``` - ### Usage ##### Opened files navigation: -
<leader> m m -open minimap -
<leader> m c -close minimap -
<leader> m f -focus minimap -
Ctrl w w -Move to next splitted frame +
<leader> m m +open minimap +
<leader> m c +close minimap +
<leader> m f +focus minimap +
Ctrl w w +Move to next splitted frame
Ctrl w <arrow> moving throught splitted frame
Ctrl w c @@ -82,14 +64,22 @@ sudo cpanm PLS split vertically
Ctrl w s split horizontally -
Ctrl w x -swap places of two splits +
Ctrl w x +swap places of two splits
gtnext tab
gT previous tab -
:tabnew -Create new tab -
Ctrl g t -(when in file tree) open selected file in new tab +
:tabnew +Create new tab +
Ctrl+g Ctrl+t +(when in file tree) open selected file in new tab +
:bd +close buffer +
:bnext +next buffer +
:b3 +switch to buffer 3 +
:buffers +list buffers and their numbers
##### File explorer: @@ -158,15 +148,14 @@ Nice single file diff viewer: :Gdiffsplit ``` -coc-git provides some commands for git: +GitGuter provides some commands for git: ```bash -:CocCommand git. +:GitGutter* #examples: -:CocCommand git.chunkUndo -:CocCommand git.showCommit -:CocCommand git.showBlameDoc +:GitGutterUndoHunk +:GitGutterDiffOrig ``` ##### Code editing stuff @@ -175,26 +164,38 @@ coc-git provides some commands for git:
jump forward by one word
b jump backward by one word -
<leader>rnrename element (function name, etc):
<leader>ftformat code -
gd -go to definition -
gy -go to type definition
gi -go to implementation -
gr -go to references
:%s/^original.\*/replacement/gc regex replacing (c is for choice prompt, its optional) -
Ctrl+f -scroll down popup with docstring -
Ctrl+b -scroll up popup with docstring -
ZZ -same as :wq
Ctrl+q -Visual block mode +Visual block select mode
+##### LSP usage + + +
<space>q +open list with diagnostics postions +
<space>e +open diagnostics floating window +
\[d +next diagnostic +
\] +previous diagnostic +
<leader>k +open hoover box and enter it +
<leader>rnrename element (function name, etc):
<leader>fformat file +
gdgo to definition
gDgo to declaration
<space>Dgo to type definition
gigo to implementation
grgo to references
Ctrl+fscroll down popup with docstring
Ctrl+bscroll up popup with docstring
<leader>wa +add workspace folder
<leader>wr +remove workspace folder +
<leader>wl +list workspace folders +
+ +##### + + ##### Sessions To save **new** session on specific path, just use `:SaveSession`, then when opening nvim there, without arguments, the session will be restored. + +