nixos/config/nvim/README.md

56 lines
1.6 KiB
Markdown
Raw Normal View History

2020-12-15 21:03:30 +00:00
# Vim config
Personal configuration and plugins for Vim
## Installing neovim AppImage
```bash
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
```bash
ln -s /path/to/config/nvim ${XDG_CONFIG_HOME:-$HOME/.config}/nvim
```
### Install script
`install.sh` currently handles installing `Packer` and `pynvim`.
Will also update existing installs if already present.
2022-11-01 16:57:32 +00:00
### Installing `Packer` plugin manager
```bash
2022-11-01 16:57:32 +00:00
git clone --depth 1 https://github.com/wbthomason/packer.nvim\
$HOME/.local/share/nvim/site/pack/packer/start/packer.nvim
```
2022-11-01 16:57:32 +00:00
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:
```bash
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](https://pypa.github.io/pipx/) in chosen manner, e.g. as given in documentation:
```bash
python3 -m pip install --user pipx
python3 -m pipx ensurepath
```
For currently configured language servers and formatters run:
```bash
pipx install pyright
pipx install fortls
pipx install black
pipx install isort
pipx install zimports
```
2022-11-02 09:15:55 +00:00
## Add LUA language server
Follow instructions from [sumneko/lua-language-server GitHub](https://github.com/sumneko/lua-language-server/wiki/Getting-Started#command-line).