2020-12-15 21:03:30 +00:00
|
|
|
# Vim config
|
|
|
|
Personal configuration and plugins for Vim
|
|
|
|
|
2022-04-28 10:00:56 +01:00
|
|
|
## 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/."
|
2022-08-04 14:53:09 +01:00
|
|
|
ln -s "$HOME/bin/nvim.appimage" "$HOME/bin/nvim" # Optional to avoid extension in commands
|
2022-04-28 10:00:56 +01:00
|
|
|
# ./nvim.appimage
|
|
|
|
```
|
|
|
|
|
2022-07-26 16:36:14 +01:00
|
|
|
## Linking setup file
|
|
|
|
```bash
|
|
|
|
ln -s $HOME/.vim/init.vim $HOME/.config/nvim/init.vim
|
|
|
|
```
|
|
|
|
|
2022-07-26 11:57:25 +01:00
|
|
|
### Installing `vim-plug` plugin manager
|
|
|
|
```bash
|
|
|
|
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'
|
|
|
|
```
|
|
|
|
Plugin definitions are in `init.vim`, inside `vim` run `:PlugInstall` to install plugins
|
|
|
|
|
|
|
|
## Enabling python support
|
|
|
|
```bash
|
2022-08-04 14:53:09 +01:00
|
|
|
pyenv virtualenv neovim3 # Assumes working pyenv
|
|
|
|
pyenv activate neovim3
|
|
|
|
pip install -U pip setuptools wheel
|
|
|
|
pip install -U pynvim "python-lsp-server[all]" fortls pylsp-mypy python-lsp-black
|
|
|
|
pyenv deactivate
|
2022-07-26 11:57:25 +01:00
|
|
|
```
|
|
|
|
|
|
|
|
## Miscellaneous settings
|
|
|
|
- Modifications in `pack/plugins/start/python-syntax`
|
|
|
|
- Edit `.git/modules/pack/plugins/start/python-syntax/info/exclude` to exclude `doc`
|
|
|
|
|
2022-04-28 10:00:56 +01:00
|
|
|
### To use with existing `~/.vimrc`
|
|
|
|
Add the following lines to neovim init file:
|
|
|
|
> set runtimepath^=~/.vim runtimepath+=~/.vim/after
|
|
|
|
> let &packpath = &runtimepath
|
|
|
|
> source ~/.vimrc
|
|
|
|
|
|
|
|
Using the following commands:
|
|
|
|
> :call mkdir(stdpath('config'), 'p')
|
|
|
|
> :exe 'edit '.stdpath('config').'/init.vim'
|
|
|
|
|
|
|
|
From [vim documentation](https://neovim.io/doc/user/nvim.html#nvim-from-vim)
|
|
|
|
|