Skip to content

pserey/conf-neovim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Neovim config files

My Neovim configuration files.

Software requirements before installing

  • Neovim >0.5
  • Pynvim
  • NodeJS and npm (Latest version)
  • Git
  • xsel
  • Any C compiler (I recommend gcc)
  • ripgrep and fd (if you want the "find word" working)

Install plugin manager (Vimscript Version - Outdated)

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://github.com/junegunn/vim-plug/master/plug.vim'

If you are using another OS, make sure to know the right command for it here.

Install plugin manager (Lua Version)

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.

Downloading configs

  • Git clone this repo
git clone https://github.com/pserey/conf-neovim
  • Copy the nvim directory (or nvim-lua) to ~/.config/nvim
cp -rf conf-neovim/nvim/ ~/.config/
# or
cp -rf conf-neovim/nvim-lua/ ~/.config/nvim

Configuring (Vimscript)

  • 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.

Configuring (Lua)

  • 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.

Configuring JAVA HOME variable

  • And finally, configure your JAVA_HOME path in coc-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 messing and adapting this configuration...

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

Link to important repos used in this configuration

FAQs

  • How do I install the latest version of NodeJS if my repositories are not updated?

you can update the current NodeJS installation with this commands:

sudo npm cache clean -f
sudo npm install -g n
sudo n latest
  • When I open nvim, I get parser errors with uv_dlopen

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
  • How do I install the required software in my PC?

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

About

My neovim configs

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published