Skip to content

LSP proxy to work from editor located in WSL and Godot located in Windows seemlessly

License

Notifications You must be signed in to change notification settings

venomlab/godot-wsl-proxy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WSL2 to Windows Godot LSP proxy

When using Neovim from WSL and Godot from Windows - the LSP file paths are not compatible

This is the simple TCP proxy that mirrors requests that LSP protocol does (JSON RPC), finds and replaces paths both ways: from linux to windows and from windows to linux

It works as a separate server that LSP Client from your editor should connect to

This project is inspired by godot-wsl-lsp but basically does this proxying on a lower level and thanks to that it works very fast

Installation

It is intended to be installed via pipx:

pipx install godot-wsl-proxy

(Not recommended) But you can do it via just pip and install it globally:

pip install --user godot-wsl-proxy

In future I plan to add this to Mason (for Neovim users)

Neovim LSP Config

You can easily configure this via small customization of nvim-lspconfig

if os.getenv("WSL_DISTRO_NAME") ~= nil then -- Easy way to check if it is WSL or no
    require("lspconfig").gdscript.setup({
        on_attach = on_attach,              -- Your buffer on_attach function
        cmd = { "godot-wsl-proxy", "run" },
    })
else
    require("lspconfig").gdscript.setup({
        on_attach = on_attach, -- Your buffer on_attach function
    })
end

About

LSP proxy to work from editor located in WSL and Godot located in Windows seemlessly

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages