My Neovim configuration files.
- Neovim >0.5
- Pynvim
- NodeJS and
npm
(Latest version) - Git
xsel
- Any C compiler (I recommend gcc)
ripgrep
andfd
(if you want the "find word" working)
Installing vim-plug is easy, just run the command below:
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'
If you are using another OS, make sure to know the right command for it here.
Install packer is simple, if you're not on any Arch distro:
git clone --depth 1 https://github.com/wbthomason/packer.nvim\
~/.local/share/nvim/site/pack/packer/start/packer.nvim
And, if you're using any Arch distro, there's a AUR package. You can install it manually or with any AUR helper like yay
yay -S nvim-packer-git
To install it on any other OS, you can find instructions here.
- Git clone this repo
git clone https://github.com/pserey/conf-neovim
- Copy the
nvim
directory (ornvim-lua
) to~/.config/nvim
cp -rf conf-neovim/nvim/ ~/.config/
# or
cp -rf conf-neovim/nvim-lua/ ~/.config/nvim
- After that, run the following commands inside neovim:
:PlugInstall
:CocInstall coc-pyright
:CocInstall coc-java
:TSInstall java
:TSInstall python
:CocInstall <any language extension you want>
For knowing more coc.nvim extensions check this link.
- After that, run the following commands inside neovim:
:PackerSync # if it gives any errors, just run it again
# install python coc.nvim extension
:CocInstall coc-pyright
# install java coc.nvim extension
:CocInstall coc-java
# install coc.nvim extension that complete pairs
:CocInstall coc-pairs
# install markdown coc.nvim extension
:CocInstall coc-markdown-preview-enhanced
# install lua coc.nvim extension (install it if you pretend to mess with configs)
:CocInstall coc-sumneko-lua
# install python TreeSitter parser
:TSInstall python
# install java TreeSitter parser
:TSInstall java
# install lua TreeSitter parser
:TSInstall lua
:CocInstall <any language extension you want>
For knowing more useful coc.nvim extensions check this link.
- And finally, configure your
JAVA_HOME
path incoc-settings.json
# Change the first line to whatever version of Java you are using and change the
# path to your java in the second line (normally in the same jvm directory)
{
"name": "JavaSE-16",
"path": "/usr/lib/jvm/java-16-openjdk",
"default": true
}
If you pretend to adapt this configuration to your taste and needs, consider installing the lua-language-server
by @sumneko. You can find installing and building instructions here, if you're on Arch or any Arch based distro, you can install this arch package:
sudo pacman -S lua-language-server
Besides that, the confg directories are in the following structures
- Lua config
nvim/
├── coc-settings.json | coc.nvim settings
├── init.lua | requiring of lua config files
└── lua
├── config.lua | plugin configurations
├── plugins.lua | plugin listing
├── settings.lua | general settings + keymappings
└── utils.lua | lua functions to simpler use of vim library
- Vimscript config
nvim/
├── coc-settings.json | coc.nvim settings
├── general
│ └── settings.vim | general settings
├── init.vim
├── keys
│ └── mappings.vim | keymappings
└── plugins
└── plugins.vim | plugin listing + configurations
-
Gruvbox (my prefered colorscheme)
you can update the current NodeJS installation with this commands:
sudo npm cache clean -f
sudo npm install -g n
sudo n latest
in my case, I solved this using the neovim nightly appimage and after the AUR package. The problem was my
snap
installation.
If you are using any Arch based system:
yay -S neovim-nightly-bin
I'll put some commands for Arch and Ubuntu users, sorry if your distro/OS is not here Ubuntu/Debian distros:
# for neovim I recommend the appimage install, but you can try snap too
sudo snap install --edge nvim --classic
pip install pynvim
# or
python3 -m pip install pynvim
# for nodeJS and npm (remember to update, apt repositories are not in the last version)
sudo apt install nodejs npm
sudo apt install git
sudo apt install xsel
sudo apt install ripgrep
# if you're using ubuntu or debian, it probably has a c compiler already installed. if not:
sudo apt install build-essential
Arch based distros:
sudo pacman -S neovim
sudo pacman -S python
sudo pacman -S python-pip # this is for python3
sudo pacman -S xsel
sudo pacman -S git
sudo pacman -Syu gcc
sudo pacman -S ripgrep
sudo pacman -S fd