-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
feat: integrate ssh into :connect #35569
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
base: master
Are you sure you want to change the base?
Conversation
9e0f51a
to
3ea2781
Compare
Just added a check for whether the file is readable using |
Here is a video showcasing the output.mp4 |
918cd14
to
4ef865d
Compare
4ef865d
to
b8d28fd
Compare
b8d28fd
to
f3614a2
Compare
Linter is failing with:
but ssh_prompts[i].value = resp
processed_idx = #stdout
vim.api.nvim_chan_send(job_id, resp .. '\n') Not sure why it's failing |
For a test, I have currently thought of this: calling `:connect ssh://localhost' should have one of three possible results (barring errors):
So, we call Thoughts @justinmk ? |
f3614a2
to
4e4011d
Compare
I didn't like how the command to find a free socket on the remote machine was working before, felt a bit flaky (there were some false positive possibilities), so I've changed it. The current method will enforce a minimum version of Neovim on the remote machine, I'm not sure if this is a problem. |
2b8f6fc
to
55fcf8f
Compare
Running `:connect` without any address provided will provide the user with a list of options to connect to, including ssh hosts configured on the system. Running `:connect ssh://host` will attempt to connect to host via connect and run Neovim remotely on the system.
55fcf8f
to
d160447
Compare
I've added a few basic test which does validation on the address passed to |
Exercising the codepaths is the first priority. Exercising failure modes is also important, but can be a later step. |
Running
:connect
without any address provided will provide the user with a list of options to connect to, including ssh hosts configured on the system.Running
:connect ssh://host
will attempt to connect to host via connect and run Neovim remotely on the system.I need some help writing the tests, not sure how to do that at all for this.
For the longest time I couldn't figure out how to avoid making the user input their password multiple time for password based authentication. Got the idea for caching prompts and responses from this plugin: https://github.com/amitds1997/remote-nvim.nvim/. Thanks a lot to https://github.com/amitds1997 for their amazing work.
Reference issue: #34257