remote-nvim.nvim
remote-nvim.nvim copied to clipboard
Weird behavior inside GUI (neovide)
Bug description
I tried using the plugin in neovide, and it generally worked, but had some issues.
- It seems to open the new client in a window or something, and there's a weird border (which doesn't exist in local / manually attached client).
- After some usage, the local client crashed, and the remote server was still alive.
- Sometimes the original, local client was shown instead of the remote-attached one, without any error message.
To reproduce
Steps to reproduce the behavior:
- Open
neovide - Use
RemoteStart <host>, with a host with the client-auto-connect option turned on. - Interact with the attached client for a bit.
- See error.
Expected behavior
- The attached client should look and feel like local client (no extra border), perhaps with some visual indication that we're attached to a remote host.
- Handle client crashes gracefully by providing the user options: stop remote, reconnect, etc.
System info
- Local OS: macOS 14.4.1 (23E224)
- Local Neovim version: neovide 0.12.2 (20240128.222629), neovim:
NVIM v0.10.0-dev-3048+gee41153a9-Homebrew Build type: Release LuaJIT 2.1.1713773202 - Remote host OS: Linux 5.3.0-28-generic #​30~18.04.1-Ubuntu
- Remote Neovim version: nightly, built from source:
NVIM v0.10.0-dev Build type: Release LuaJIT 2.1.1713484068
Thanks for reporting this. I have not worked with any Neovim GUI so far so never configured the plugin for it. I'll check this out.
Worked around it by setting:
client_callback = function(port, _)
local cmd = ("neovide --server localhost:%s"):format(port)
vim.fn.jobstart(cmd, {
detach = true,
on_exit = ...
})
end,
Awesome. That's how I drive my personal set up too.
I have a PR open to fix part 1 of your issue. I have squashed one bug that might have been leading to 2 and 3, but not sure if your issue got fixed. Let me know if it is not.
Hey, let me know if you are still seeing any issues in Neovide or otherwise.
Going ahead and closing this. If you or anyone else still faces issue mentioned here, please re-open this or create a new issue.
Hi @amitds1997, sorry for disappearing.
I actually stopped using neovide with remote-nvim, since it was less convenient than tmux+TUI (I wanted persistent terminals in the remote host).
I didn't test the default behavior after your change because the custom client command worked perfectly. If you want I can play around with the latest version.
Thanks!
Hey, no worries. As long as it works for you, that's great. If anyone else faces any such issue, they'll open a new issue. Thanks!