This is a guide to how I've set up Neovim on Windows 11 and Windows 10.
The result will be Neovim with:
Edit in Neovim
menu item in the Windows context menu in Explorer.LazyVim
and supporting software to get treesitter
You can install Neovim with or without local administrator rights on your system. However, if you install it without administrator some steps require alternatives to be performed, or cannot be performed, or require manual editing of the provided registry and JSON files. The following symbols below will note this:
Prerequisites:
winget install Microsoft.WindowsTerminal
on Windows 10.SauceCodePro Nerd Font
in the supplied configurations.🔐 Install Neovim :
winget install neovim.neovim
🧑 Download the
nvim-win64.zip file from here and
unzip and copy the Neovim folder to your preferred location and
Add C:\path\to\Neovim\bin
to your
path.
Copy the Neovim favicon.ico
to C:\Program Files\Neovim
📝.
Some software in this guide requires the Path
to be update so it can be found.
Replace <path>
in this PowerShell snippet and run it to add the directory to
your path:
[Environment]::SetEnvironment("Path", $env:Path + ";<path>", "User")
I'm using the Flexoki theme which supports both Windows Terminal and Neovim. Feel free to choose your own.
Open Windows Terminal and open the Settings then click on Open JSON file
.
Find the section with other terminal profiles and copy paste the contents of
windows_terminal_profile.json📝.
Repeat this for windows_terminal_theme.json
putting it where the other themes are if you want to use the Flexoki
theme.
You should now be able to launch Neovim from the Windows Terminal menu.
Open the Custom Context Menu
application.
Click on the folder icon for Open Menu Config Folder
and copy these files into
the folder:
You will need to sign out then sign in again or restart explorer.exe
in Task
Manager for the change to take effect.
You should now have a second Open with
menu.
You can customise the name of this with Custom Context Menu
.
The Windows 10 context menu can also be configured by:
🔐 Import HKCR_win10_nvim_context_menu.reg
file.
or
🧑 Import HKCU_win10_nvim_context_menu.reg
📝 file.
To associate Neovim with different file types add it as a suggested application.
🔐 Import HKCR_applications_nvim.reg
then restart explorer.exe
.
or
🧑 Import HKCU_applications_nvim.reg
📝 then restart explorer.exe
.
Open Windows Settings/Apps/Default apps
and set Neovim to be the default for
files you want to use it for or you can do it when you open the file type.
For example:
.bash
.c
.cfg
.config
.cpp
.gitconfig
.gitignore
.h
.hcl
.inf
.ini
.java
.js
.json
.log
.lua
.markdown
.md
.php
.pl
.py
.rb
.sh
.tf
.tfvars
.txt
.vim
.yaml
.yml
LazyVim is a Neovim distribution that provides a range of plugins, syntax highlighting using treesitter, and LSPs.
It took me a while to get it working on Windows 10 and 11, particularly compiling the treesitter parsers, so the steps below are here to document how I did it.
Prerequisites:
winget
:
C:\Program Files\7-Zip
to your path so Neovim can find it.Note: if you do not have administrator rights then some functionality will be missing.
$Env:Path
and check that...\Neovim\bin
there as well as zig.PowerShell
terminal profile and change the font to your preferredIf you want to Flexoki
as your Neovim theme copy theme.lua
to
$Env:LOCALAPPDATA\nvim\lua\plugins
.
Now you can run nvim
and you should see it download LazyVim, its plugins,
compiling treesitter parsers, and installing LSPs.
By default there are around 24 treesitter parsers that LazyVim includes and it seems to not want to compile them all in one go. Quitting and starting nvim again around 5-10 times seems to sort it out.