nixos/config/nvim/README.md
Evie Litherland-Smith 85342ba955 Convert nvim config to full dotfiles repo
Restructure ready for adding additional config files
2023-01-10 07:55:21 +00:00

1.8 KiB

Vim config

Personal configuration and plugins for Vim

Installing neovim AppImage

curl -LO https://github.com/neovim/neovim/releases/latest/download/nvim.appimage
chmod u+x nvim.appimage
mv nvim.appimage "$HOME/bin/nvim"

Installing configuration

git clone git@github.com:elitherl/vim-config.git ${XDG_CONFIG_HOME:-$HOME/.config}/nvim
# or using symlink
git clone git@github.com:elitherl/vim-config.git /path/to/directory
ln -s /path/to/directory ${XDG_CONFIG_HOME:-$HOME/.config}/nvim

Install script

install.sh currently handles installing Packer, pynvim, pipx and currently configured language servers with formatters. Will also update existing installs if already present.

Installing Packer plugin manager

git clone --depth 1 https://github.com/wbthomason/packer.nvim\
 $HOME/.local/share/nvim/site/pack/packer/start/packer.nvim

Plugin definitions are in plugins.lua, inside vim run :PackerSync to install plugins

Enabling python support

Set up neovim specific virtual environment to install pynvim package:

python3 -m venv "${XDG_CONFIG_HOME:-$HOME/.config}/nvim/venv"
source "${XDG_CONFIG_HOME:-$HOME/.config}/nvim/venv/bin/activate"
pip install -U pip setuptools wheel && pip install -U pynvim
source deactivate

Installing language servers using pipx

Install pipx in chosen manner, e.g. as given in documentation:

python3 -m pip install --user pipx
python3 -m pipx ensurepath

For currently configured language servers and formatters run:

pipx install pyright
pipx install fortls
pipx install black
pipx install isort
pipx install zimports

Add LUA language server

Follow instructions from sumneko/lua-language-server GitHub.