- Install Neovim
- Add Directory to your Executable Path
- Themes
- Configure Windows Terminal
- Configure the Windows 11 Context Menu
- Add Neovim as a Suggested App
- Associate File Types with Neovim
- Optional: Install LazyVim
This is a guide to how I've set up Neovim on Windows 11 and Windows 10.
The result will be Neovim with:
- Windows Terminal as its UI.
- An application you can associate with file types in Windows.
- An
Edit in Neovim
menu item in the Windows context menu in Explorer. - Optional installation of
LazyVim
and supporting software to gettreesitter
syntax highlighting and LSPs functioning.
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:
- 🔐 Requires administrator privileges.
- 🧑 Alternate step for non-administrators.
- 📝 Modification of the step or editing of the file required if you installed Neovim in an alternate location.
Prerequisites:
- Windows Terminal:
This comes with Windows 11 or install using
winget install Microsoft.WindowsTerminal
on Windows 10. - Custom Context Menu: Install (pay for it or use free trial) Custom Context Menu - Download and install on Windows | Microsoft Store. This will allow you to customize the Windows 11 context menu. The Github and wiki here ikas-mc/ContextMenuForWindows11.
- A Nerd Font.
I use the
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:
- Diff in Neovim.json📝
- Edit in Neovim.json📝
- Edit in Neovim Clean.json📝 - Runs Neovim without loading your plugins and configuration.
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:
- Open a Windows PowerShell terminal and install these packages using
winget
:- Microsoft.Git
- burntsushi.ripgrep.MSVC
- sharkdp.fd
- 🔐 OpenJS.NodeJS - required by a few LSPs.
- Python.Python.3.12
- zig.zig - this is required by treesitter to compile parsers.
- 🔐 Microsoft.PowerShell
- 🔐 7zip.7zip - Add
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.
- Close the terminal.
- Open a new PowerShell terminal and type
$Env:Path
and check that...\Neovim\bin
there as well as zig. - Optional:
Edit the
PowerShell
terminal profile and change the font to your preferred Nerd Font. - Follow the LazyVim Windows installation instructions.
If 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.