Cool Neovim setup.
The whole idea is to gather all next features:
- File system tree view
- File browsing history
- Grep like functionaliry (with Telescope and Fzf)
- Find like functionaliry (with Telescope and Fzf)
- Auto-completion
- Navigation tools
- Bookmarks
- File browsing stack
- Back/Forward navigation
- Editor features
- identation
- commentaries
- highlighting
- copy-pasting nvim <-> host
- Version Control Systems
- git (with Lazygit and tig)
- LSP(Language Server Protocol)
- Python
- Rust
- C/C++(TOBEDONE)
- JS(TOBEDONE)
Check out hotkeys.
Or simply F1 to toggle help popup.
Warning
Versions of is very important to get things working. neovim - v0.11.6
mkdir -p ~/Download/tbr.neovimsetup
cd ~/Download/tbr.neovimsetup
wget https://github.com/neovim/neovim/releases/download/v0.11.6/nvim-linux-x86_64.tar.gz .
tar xzvf ./nvim-linux-x86_64.tar.gz
sudo cp -rf ./nvim-linux-x86_64/* /usr/local
That it!
Double check neovim version:
nvim --version
shall be this:
NVIM v0.11.6
Build type: Release
LuaJIT 2.1.1741730670
Run "nvim -V1 -v" for more info
Warning
Stable work of this setup depends on how well plugins are fitting all together.
Therefor plugin versions shall be freezed to mark tested and well working versions.
Here is file lazy-lock.json.
This file contains the exact commit SHAs for every plugin.
Use :Lazy restore to enforce the freeze.
When you want to ensure your current Neovim instance matches the versions recorded in your lazy-lock.json (for example, after cloning your config to a new machine or if a plugin updated unintentionally), run:
:Lazy restore
This command reads lazy-lock.json and checks out every plugin to the exact commit listed there, ignoring any newer versions.
This command does not update lazy-lock.json.
It only changes your installed plugins to match it.
If upon copy-pasting from nvim to host you get an error clipboard: no provider comes up than system clip-board utility has to be installed.
For Wayland:
sudo apt install wl-clipboard
For X11:
sudo apt install xclip
or:
sudo apt install xsel
To make features like history working have to install proper version of fzf.
Latest recommended version is 0.52.1.
Still newer version shall be good.
sudo apt purge fzf
cd ~/Downloads/
wget https://github.com/junegunn/fzf/releases/download/v0.74.4/fzf-0.74.4-linux_amd64.tar.gz
sudo tar -xvf fzf-0.74.4-linux_amd64.tar.gz -C /usr/local/bin/
Install ripgrep:
sudo apt update \
&& sudo apt install -y ripgrep
Neovim plugins (especially Treesitter) require a compiler to build syntax highlighting parsers.
Install this ones.
sudo apt update \
&& sudo apt install build-essential
Lazygit is a powerful git tool and has to be installed 1st.
Then it's integrated into neovim via lazy-git plugin.
mkdir -p ~/Download/tbr.neovimsetup
cd ~/Download/tbr.neovimsetup
wget https://github.com/jesseduffield/lazygit/releases/download/v0.65.1/lazygit_0.65.1_linux_x86_64.tar.gz
sudo tar -xvf lazygit_0.65.1_linux_x86_64.tar.gz -C /usr/local/bin/
Chack Lazygit for more details.
Tig is a git tool and has to be installed 1st.
Then it's integrated into neovim via tig-explorer plugin.
sudo apt install tig
Install python itself and venv tool:
sudo apt update \
&& sudo apt install -y python3 python3-pip python3-venv
Install system wide packages:
sudo apt install fd-find
Note
To get LSP working install basedpyright and ruff rignt into project specific(venv) folder:
. .venv/bin/activate
pip install basedpyright ruff
If here is no venv install these tool globally.
Install Rust:
sudo snap install rustup --classic
rustup default stable
rustup component add rust-analyzer
This shall be enough.
LSP will be initialized only inside a Cargo project folder.
To get accurate results (and avoid false errors in Neovim), clangd needs to know your project's build flags.
It looks for a file named compile_commands.json.
- If you use CMake: Generate it by running cmake -B build -DCMAKE_EXPORT_COMPILE_COMMANDS=ON. You can then symlink or copy build/compile_commands.json to your project root.
- If you use Make: Install bear (sudo apt install bear) and run your build with bear -- make
Will be using clangd LSP server.
Install clangd LSP server:
sudo apt install clangd bear
Note
C/C++ shal be installed, other-wise howcome LSP server can find standard libraries and other tools.
Install C/C++ toolchain:
sudo apt install cmake build-essential libgtest-dev
Clone this repository into user home folder:
git clone https://github.com/donDonald/cool_nvim_setup.git ~/.config/nvim
This shall be enough.
Than simply start nvim:
nvim
Omce started for the 1st time neovim will install all plugins.
Lazy plugin manager will popup.
q to quit Lazy.
F2 to popup Lazy back.
Ctrl+t to show tree view.
Than simply navigate to any file and hit Enter.
To cleanup neovin plugins setup:
rm -rf ~/.local/share/nvim/lazy/
rm -rf ~/.config/nvim




