remote-nvim.nvim icon indicating copy to clipboard operation
remote-nvim.nvim copied to clipboard

Weird behavior inside GUI (neovide)

Open shahamran opened this issue 1 year ago • 3 comments

Bug description

I tried using the plugin in neovide, and it generally worked, but had some issues.

  1. 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). image
  2. After some usage, the local client crashed, and the remote server was still alive. image
  3. Sometimes the original, local client was shown instead of the remote-attached one, without any error message.

To reproduce

Steps to reproduce the behavior:

  1. Open neovide
  2. Use RemoteStart <host>, with a host with the client-auto-connect option turned on.
  3. Interact with the attached client for a bit.
  4. 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
    

shahamran avatar May 01 '24 07:05 shahamran

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.

amitds1997 avatar May 01 '24 15:05 amitds1997

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,

shahamran avatar May 08 '24 13:05 shahamran

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.

amitds1997 avatar May 08 '24 13:05 amitds1997

Hey, let me know if you are still seeing any issues in Neovide or otherwise.

amitds1997 avatar May 25 '24 14:05 amitds1997

Going ahead and closing this. If you or anyone else still faces issue mentioned here, please re-open this or create a new issue.

amitds1997 avatar Jun 08 '24 09:06 amitds1997

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!

shahamran avatar Jun 09 '24 06:06 shahamran

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!

amitds1997 avatar Jun 09 '24 07:06 amitds1997