mhinz / neovim-remote

:ok_hand: Support for --remote and friends.
MIT License
1.73k stars 83 forks source link

Allow to check if remote exists #170

Open fwsmit opened 2 years ago

fwsmit commented 2 years ago

If you want to open a file from e.g. Unity, nvr is very useful. Following this tutorial, I have a script that opens the files. The only thing is that it needs to create a gnome-terminal window to be able to create the first neovim instance. This is visually jarring, so I would like to be able to check if the instance already exists and choose to run the command in a terminal or not depending on that.

fwsmit commented 2 years ago

Oh I see that there is already a PR about it in #145. I'll keep this open until it's merged.

fwsmit commented 2 years ago

Oh I see that there is already a PR about it in #145. I'll keep this open until it's merged.

This PR does something differnt, but I did find a solution using --serverlist:

nvr --serverlist | grep unity
nyngwang commented 2 years ago

@fwsmit Could you share your script to make neovim work with Unity on macOS?

fwsmit commented 2 years ago

I see that you've found it, but for others: https://github.com/fwsmit/dotfiles/blob/a26fcf321a11618c5353d44c17f8f7e280d216aa/private_dot_local/bin/executable_nvim-unity

Commit with comments