/nvim_optimizations

Optimisations for nvim ;-)

Primary LanguageShell

nvim optimizations

Optimized for Debian >= 10 / Ubuntu >= 18.04 (based on work of TJDevries : https://www.youtube.com/watch?v=stqUbv-5u2s and Chris Power : https://www.youtube.com/playlist?list=PLsz00TDipIffxsNXSkskknolKShdbcALR)

Description : These optimizations, will add features like autocompletion for BASH, PHP, HTML, JS and LUA files (more can be added), tree exploration, filesearch, occurence search over mutiple files (live grep) etc. In the original configuration phpactor is used for PHP completion. I disabled it and enable intelephense instead which I feels more efficient. (May be because I don't know enough the product)

I also used some of the key bindings from nvim-lua/kickstart.nvim (https://github.com/nvim-lua/kickstart.nvim/blob/master/init.lua)

Client terminal requirement :

Host requirement :

Installation :

- Semi-Auto :

  • Run the following command :
cd && wget https://github.com/bellaichef/nvim_optimizations/raw/main/install.sh && chmod +x install.sh && ./install.sh
  • It's really not perfect but it save a little bit of time. Nvim will launch by itself, first time it'll install required nvim plugins. Once finished, close nvim and then you'll see treesitter and Mason LSPs setup. Once this finish, everything is done.

- Manual installation :

  1. Check that you meet all requirements
  2. Copy nvim folder in ~/.config/
  3. Run nvim and let packages install.
  4. Close and re-open nvim. You should see treesitter and Mason LSPs setup.
  5. Close nvim.

You should then get something like this when opening a file with neovim :

Screenshot from 2023-01-06 10-19-21

Done !!

Things you have to know (tips):

  • PHP LSPs need to find .git (file or folder) in the file's folder your are editing or in one of its parents directory. For now I don't know how to avoid this behaviour. So I put a .git file in /var/tmp/ and I use 'sudoedit' or 'sudo -e' to edit my files.
  • If you want to set nvim as default system editor run this command : 'sudo update-alternatives --config editor', and choose nvim.
  • in case of using TMUX run the following command on the host : 'export TERM=screen-256color' to avoid a wrong colorscheme (optional)

Below find the list of installed packages:

I advise you to check the videos of TJDevries and Chris Power that'll show you how these modifications enhance your nvim. (Start of readme)

Bye !