This is a guide for setting up Neovim in Windows with plugins for doing Python development. While most of the time I'll be working in WSL using a similar Neovim setup there, I thought it be handy to have approximation of the config in Windows.
Packages
We'll be using scoop for installing neovim and our Python versions (2 and 3). Head on over to https://scoop.sh/ and follow the instructions there to get scoop configured and installed.
Neovim is present in the main buckets:
scoop install neovim
As well as Python 3.8.0
scoop install python
Let's also grab a copy of Python 2.7.17 so we can create a virtualenv for either version
scoop bucket add versions
scoop install python27
Grab a copy of fzf for fuzzy finding in your project directories. We'll install an plugin for this in a later step
scoop install fzf
And rg for text searching
scoop install rg
Virtualenvs
We'll be creating virtualenvs for nvim to use Python plugins, like deoplete, as well as one for the black formatting plugin. By default, the pip shim should point to the binary in your Python 3.8 install.
pip install virtualenv
md C:\Users\coolguy\virtualenvs
cd virtualenvs
virtualenv -p C:\Users\coolguy\scoop\apps\python\3.8.0\python.exe nvimpy3
virtualenv -p C:\Users\coolguy\scoop\apps\python27\2.7.17\python.exe nvimpy2
virtualenv -p C:\Users\coolguy\scoop\apps\python\3.8.0\python.exe black
Now we'll install some packages in the virtualenvs.
The config for Neovim lives in C:\Users<user>\AppData\Local\nvim\init.vim. The following is the config we'll be using:
First Run
You'll get some errors of nonexistent packages. In command mode, enter :PlugInstall to install the plugins listed in init.vim. To update these later, run :PlugUpdate.
Top comments (3)
Thanks Man
I cannot find init.vim in my AppData Local Directory Folder ?
you need to create with notepad or your text editor. and save it with name init.vim