Skip to content

Instantly share code, notes, and snippets.

@FREEZX
Last active July 23, 2023 12:41
Show Gist options
  • Select an option

  • Save FREEZX/d675b57db2f41b11088d54e1654a0e40 to your computer and use it in GitHub Desktop.

Select an option

Save FREEZX/d675b57db2f41b11088d54e1654a0e40 to your computer and use it in GitHub Desktop.
Windows Unity Neovim launcher
To use this, you need to have a neovim installation and neovide. In unity preferences, browse to the .bat file and set it as external script editor.
Here are the editor args needed to launch: `"$(ProjectPath)" $(File) $(Line)`
cd %1
set file=%2
set row=%3
set remote=localhost:6666
netstat -o -n -a | findstr 6666
if %ERRORLEVEL% equ 0 goto FOUNDSRV
START /B nvim --headless --listen %remote%
:FOUNDSRV
nvr --servername %remote% --remote +%row% %file%
tasklist|find /i "neovide.exe" >NUL
if %ERRORLEVEL% equ 0 goto FOUNDNVIDE
START /B neovide --noidle --server %remote% %file%
:FOUNDNVIDE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment