neovim/README.md

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

  1. neovim
  2. git
  3. A python virtualenv with python dependencies installed. (see pyenv section).
  4. nodejs, yarn
  5. vim-plug
  6. ripgrep
  7. The Silver Searcher (ag)
  8. A font patched for nerds.

Installation

  1. Check the requirements. ⬆
  2. Clone the repository
    git clone <URL>
  3. Create a symlink:
    ln /path/neovim/init.vim /home/user/.config/nvim/init.vim.
  4. Install vim-plug.
  5. Start neovim.
  6. 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