nixos/README.md

48 lines
1.4 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.appimage
```
## Linking setup file
```bash
ln -s $HOME/.vim/init.vim $HOME/.config/nvim/init.vim
```
### 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
Install `pynvim` package for python
## Installing language servers for LSP
```bash
pip install -U "python-lsp-server[all]" fortls
```
Installs `pylsp` and `fortls` servers
## Miscellaneous settings
- Modifications in `pack/plugins/start/python-syntax`
- Edit `.git/modules/pack/plugins/start/python-syntax/info/exclude` to exclude `doc`
### 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)