-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failed to connect to server -- Operation timed out #129
Comments
I think it's ok now.
Thanks for this! I'll keep a close eye on developments. I do a lot of remote editing over unstable connections, and it's really annoying to have to choose between nvim-ing in a remote ssh terminal with laggy response; or mounting a remote path locally, editing, and then hanging every time |
You can kill a connection by moving your cursor over it and pressing
TLDR; it's difficult unless the navigation plugin is very extensible. The way the distant.nvim plugin works, you need to be able to override at least the following:
Beyond that, if you want to rename a file/directory, deleting a file/directory, create a new file, or create a new directory then you'd need to leverage distant's API as well. A plugin like lir.nvim would just about let you do this as you can provide a function to be executed for each mapping, but it still handles loading a directory and querying file details in a way that we cannot overwrite.
It looks like you were connecting via a distant server, so search should be supported, but the Lua wrapper is a bit unstable .
I use it at work, but there are definitely rough edges. The next improvement to this plugin actually is related to some unfinished work on the distant Rust project, specifically the branch to switch ssh to native rust and introduce a better plugin API. But my time as of late has been limited, so I haven't finished the branch. Once that's done, you can both expect more ways to connect (Docker is first on the list) and better feedback when issues occur (connection problems, reconnecting, suggestions on port forwarding, etc). |
Thanks a lot for your detailed replies! I'm enjoying distant and look forward to next pieces. One other question: in my just-getting-started workflow with distant, I've been using neovim in one terminal pane and an ssh session to a shell on the remote machine in the adjoining pane. The remote machine is running I wonder if there would be a way to give a command to the server to load a file from the remote machine to a buffer in neovim on the local machine. I imagine semantics something like this: # this is a remote server
pball@snowball🌐:~
❯ distant server nvim-open path/to/myfile And a buffer for |
No feature like that exists at the moment. Would you mind moving this to a new discussion? We can follow up from there |
I think this is related to #126 but there seem to be two differences. First, the error is a timeout rather than a deserialization. Second, distant can do something on the remote server, so the ssh handshaking is working, and distant is able to execute the server remotely. But the connection doesn't happen.
On local:
The timeout is consistently ~19s. I see on remote:
Update: the note in #94 about the open port on the remote machine may be the key for me. I have an extra port open, so from inside Neovim, I tried
:DistantLaunch ssh://ssh://[email protected]:2222 distant.args="port 2022"
and I got a connection. I could see the remote machine with:Distant
. However, it hung onDistantOpen <path>
. Keeping at it.The text was updated successfully, but these errors were encountered: