diff --git a/README.md b/README.md index 4baee93..9576b94 100644 --- a/README.md +++ b/README.md @@ -15,36 +15,66 @@ Installing system stuff (Fedora example): ```bash sudo dnf install \ + python3-pip \ neovim \ ripgrep \ fd-find \ npm \ tree-sitter-cli \ wl-clipboard \ - dejavu-fonts-all-2.37-18.fc36.noarch + dejavu-fonts-all \ + gnu-free-mono-fonts pip install \ pynvim \ 'python-lsp-server[all]' \ flake8 \ + pyright 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 + +# installing packages, which mason-lspconfig cannot autoinstall (?) +:MasonInstall phpcs ``` 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) +#### General info + +##### Mason: + +Mason installs stuff in `.local/share/nvim/mason/packages` so they are independent from system stuff, like pip installed python packages. + ### Usage +##### root perms when editing + +```bash +# Re-open a current file with sudo +:SudaRead +# Open /etc/sudoers with sudo +:SudaRead /etc/sudoers +``` + +```bash +# Forcedly save a current file with sudo +:SudaWrite +# Write contents to /etc/profile +:SudaWrite /etc/profile +``` + ##### Opened files navigation:
<leader> m m @@ -117,8 +147,15 @@ On Fedora there is need to make sure your system can display any unicode charact ##### Git stuff -
Ctrl+g -show current code chunk changes
+
Ctrl+g +show current code chunk changes
<leader>hb +show full git blame of current line +
<leader>hDshow splitted blame diff +
<leader>hdshow splitted diff
<leader>hr +reset hunk +
<leader>hRreset whole buffer +
<leader>tdtoggle deleted +
Genreal git commands: @@ -146,14 +183,16 @@ Nice single file diff viewer: :Gdiffsplit ``` -GitGuter provides some commands for git: +GitSings provides some commands for displaying git stuff: ```bash -:GitGutter* +:Gitsigns * #examples: -:GitGutterUndoHunk -:GitGutterDiffOrig +:Gitsigns toggle_word_diff +:Gitsigns toggle_linehl +:Gitsigns toggle_numhl +:Gitsigns toggle_signs ``` ##### Code editing stuff @@ -195,5 +234,3 @@ GitGuter provides some commands for git: ##### Sessions To save **new** session on specific path, just use `:SaveSession`, then when opening nvim there, without arguments, the session will be restored. - -