Windows + WSL2 External Editor
May 6, 2026 ยท View on GitHub
This workflow is for:
- Neovim running inside WSL2
- Godot running on Windows
- opening scripts from Godot into the WSL Neovim instance
The bridge works in two steps:
- Windows launches a small PowerShell wrapper.
- The wrapper converts the Windows file path to a WSL path and asks
nvrinside WSL to open it in the existing Neovim server.
Requirements
- WSL2 with your Linux distribution installed
nvrinstalled inside WSL- Neovim started in WSL with
--listen, or through thegodotdevwrapper from this repository wsl.exeavailable from Windows, which is standard on recent Windows installations with WSL enabled
For the GDScript LSP itself, the recommended option is the community bridge godot-wsl-lsp. It sits between Neovim in WSL and the Godot LSP server on Windows and rewrites Windows and WSL paths in both directions.
- Repository: https://github.com/lucasecdb/godot-wsl-lsp
- Package summary: https://npm.io/package/godot-wsl-lsp
checkhealth godotdev will also mention this bridge when it detects a WSL environment.
Microsoft documents both the WSL localhost forwarding behavior and Windows/Linux file-system interop:
- Windows can reach services listening inside WSL on
localhostwhen localhost forwarding is enabled. - Windows paths like
C:\\...map to WSL paths like/mnt/c/....
Setup
- Start Neovim inside WSL with a listening server:
nvim --listen /tmp/godot.nvim
- In Godot on Windows, point the external editor to the PowerShell bridge:
Exec Path:
powershell.exe
Exec Flags:
-NoProfile -ExecutionPolicy Bypass -File C:\path\to\godotdev-wsl2.ps1 {file} {line} {col}
- If you want to pin a specific WSL distribution, set:
$env:GODOT_WSL_DISTRO = "Ubuntu"
- If your Neovim server uses a different socket path, set:
$env:GODOT_NVIM_SOCKET = "/tmp/godot.nvim"
- For GDScript LSP, install and run
godot-wsl-lspinside WSL instead of connecting Neovim directly to Godot.
npm install -g godot-wsl-lsp
Then point your GDScript LSP setup at godot-wsl-lsp as described by the bridge project.
Script
The bridge script is provided in this repository at:
It accepts the standard Godot editor arguments:
{file}{line}{col}
The current bridge uses the file and line arguments. The column is accepted for compatibility but ignored by nvr in this first version.
Notes
- This is only for the editor open-file workflow.
- It does not change the plugin's DAP behavior.
- If you are editing files stored on the Windows filesystem, WSL will see them under
/mnt/<drive>/.... - If you want to keep everything on the Linux side, store the project inside the WSL filesystem and open that path from Godot through the bridge.