How do I use nvim --server
? I'm on Windows 10 and I installed nvim with scoop. I try these commands:
> nvim --version
NVIM v0.10.0
Build type: Release
LuaJIT 2.1.1713484068
Run "nvim -V1 -v" for more info
> nvim --listen ~/.nvim-cache/server.pipe
As expected, nvim launches in my command prompt window. I switch to another command prompt:
> nvim --server ~/.nvim-cache/server.pipe --remote somefile.txt
nvim launches another instance in my command prompt window instead of opening that file in the first instance. There's a flash of some garbled characters (starting with +qm+54
) and then the file displays, but that happens every time I start nvim.
I've also tried using %USERPROFILE%\.nvim-cache\server.pipe
and ~/server.pipe
instead of ~/.nvim-cache/server.pipe
. I tried editing and saving the pipe in nvim (the contents aren't modified after launching --server
).
Nothing in the documentation indicates this feature is platform-specific, so what am I doing wrong?
How can I use --servername and --remote in neovim? is related, but asking about vim's clientserver feature in neovim whereas I'm trying to use nvim's version of this paradigm.
--remote-silent
support has been removed from Neovim. To have only one instance of Neovim I use the solution described in that answer--remote
was added back in 2022. The nvim docs even have some nvim-specific examples which I was referencing when trying to get it working.--remote
but not--remote-silent
what I have understood is that the Neovim project focus on the server and that--remote
allowd to share one server across different clients. But I understand that you are interested by the 'opposite' to get only one client.