2.1 KiB
2.1 KiB
My neovim
setup
I'm trying to document my neovim setup. Mostly, I'm using neovim to edit markdown, HTML, CSS/SCSS and python files.
I'm using vim-plug
as a plugin manager. To install and activate vim-plug
see the documentation.
To do
- Document how to use
pyenv
to provide a python engine. - Identify the python package dependencies.
Requirements
neovim
git
- A python virtualenv with python dependencies installed. (see pyenv section).
nodejs
,yarn
- vim-plug
- ripgrep
- The Silver Searcher (
ag
) - A font patched for nerds.
Installation
- Check the requirements. ⬆
- Clone the repository
git clone <URL>
- Create a symlink:
ln /path/neovim/init.vim /home/user/.config/nvim/init.vim
. - Install
vim-plug
. - Start
neovim
. - Install the plugins (
:PlugInstall
).
Create a virtualenv with pyenv
Benefit: having a separate virtual environment for the python engine than the one your working into.
Install pyenv
with the pyenv-installer
.
Install the python version you need with pyenv
:
pyenv install <python version>
Create and name the virtual environment for neovim:
pyenv virtualenv <python version> neovim
Activate the virtual environment and fetch the python path:
pyenv activate neovim
pyenv which python # Note the provided path
Add the following line to your init.vim
:
let g:python3_host_prog = '/full/path/to/neovim/bin/python
Install the python dependencies in the virtual environment as it is activated:
pip install -r requirements.txt
To deactivate the virtual environment:
pyenv deactivate