GSoC: Neovim over SSH #35510
siddhantdev
started this conversation in
General
Replies: 1 comment
-
why?
Just ignore this for now. It's more important to just get something actually working. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
The current plan for making
:connectwork withssh://addressis to connect toaddresswith SSH, start Neovim on the remote and tunnel the server socket to a local socket. Then the current UI client can connect to this local socket with:connect, thus allowing editing on the remote computer.The problem that this faces is that making that SSH connection requires use of
vim.fn.jobstart()with either theptyor thetermoptions to effectively take input from the user and neither of those options allowsdetach. As a result of this, when the local Neovim server is stopped aSIGHUPsignal is sent to the job and the SSH connection is closed as well which stops the remote client.There are two possibilities that have been discussed till now (on Matrix). They are:
setsid, which effectively adds adetachlike option tojobstartwithpty.connect!for SSH addresses becauseconnect!stops the background Neovim server. One problem this could face is that if there are more clients connected to the server and one of them close it, the SSH job will still be stopped.I think option 2 is better because it is a lot simpler as option 1 will require OS specific handling and has the potential to get messy.
connect ssh://addresswill connect to the address and then detach from the neovim server. The detached server can continue running in the background, maintaining the ssh tunnel.vim.fn.jobstart()is required becausevim.systemcurrently does not have any way of usingptyto interact with the running program which is necessary here.Ref:
#34257
Beta Was this translation helpful? Give feedback.
All reactions