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)
- Use of nerdfonts (optional but prettier : https://www.nerdfonts.com/font-downloads)
- Packages :
- git (run : 'sudo apt install git -y')
- g++ (run : 'sudo apt install g++ -y')
- ripgrep (https://github.com/BurntSushi/ripgrep)
- Nvim >= 0.8 (https://launchpad.net/~neovim-ppa/+archive/ubuntu/unstable)
- NodeJS >= 16.x.x for Ubuntu 18.04 (Node 16 : https://joshtronic.com/2021/05/09/how-to-install-nodejs-16-on-ubuntu-2004-lts/)
- OR
- NodeJS >= 18.x.x for Ubuntu 20.04 and above(Node 18 : https://joshtronic.com/2022/04/24/how-to-install-nodejs-18-on-ubuntu-2004-lts/)
- Npm (https://joshtronic.com/2022/04/24/how-to-install-nodejs-18-on-ubuntu-2004-lts/)
- PHP8.x (https://linuxize.com/post/how-to-install-php-8-on-ubuntu-20-04/)
- Composer ( installation : https://getcomposer.org/download/)
- 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.
- Check that you meet all requirements
- Copy nvim folder in ~/.config/
- Run nvim and let packages install.
- Close and re-open nvim. You should see treesitter and Mason LSPs setup.
- Close nvim.
You should then get something like this when opening a file with neovim :
Done !!
- 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)
- wbthomason/packer (https://github.com/wbthomason/packer.nvim)
- ellisonleao/gruvbox (https://github.com/morhetz/gruvbox)
- nvim-tree/nvim-tree (https://github.com/nvim-tree/nvim-tree.lua)
- nvim-tree/nvim-web-devicons (https://github.com/nvim-tree/nvim-web-devicons)
- nvim-lualine/lualine (https://github.com/nvim-lualine/lualine.nvim)
- nvim-treesitter/nvim-treesitter (https://github.com/nvim-treesitter/nvim-treesitter)
- hrsh7th/nvim-cmp (https://github.com/hrsh7th/nvim-cmp)
- hrsh7th/cmp-nvim-lsp (https://github.com/hrsh7th/cmp-nvim-lsp)
- L3MON4D3/LuaSnip (https://github.com/L3MON4D3/LuaSnip)
- williamboman/mason (https://github.com/williamboman/mason.nvim)
- williamboman/mason-lspconfig (https://github.com/williamboman/mason-lspconfig.nvim)
- neovim/nvim-lspconfig (https://github.com/neovim/nvim-lspconfig)
- nvim-telescope/telescope (https://github.com/nvim-telescope/telescope.nvim)
- nvim-lua/plenary (https://github.com/nvim-lua/plenary.nvim)
- nvim-ripgrep (https://github.com/rinx/nvim-ripgrep)
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 !