Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Explain the difference between the plugin and the usual ssh + nvim #116

Closed
00sapo opened this issue Apr 28, 2024 · 5 comments
Closed

Explain the difference between the plugin and the usual ssh + nvim #116

00sapo opened this issue Apr 28, 2024 · 5 comments

Comments

@00sapo
Copy link

00sapo commented Apr 28, 2024

Reading the readme and trying the plugin, it looks to me it's doing something very similar to ssh into the remote server and then running nvim as usual.

Can you expand on the benefits of this plugin? Maybe in the readme?

Thanks!
f

@amitds1997
Copy link
Owner

amitds1997 commented Apr 28, 2024

Thanks for raising this question. The overall goal is to take away the effort required to set things up as much as possible and provide Neovim equivalent of VS Code Remote Development.

It's the same as SSH+Neovim except this takes away most of the work needed to setting things up and provides some additional nice-to have features on top:

  1. Automatically installs Neovim on remote
  2. Does not mess with the global configuration and instead just writes everything to a single directory on remote
  3. Can copy over your local Neovim configuration to remote
  4. Allows easy re-connection to past sessions
  5. Makes it easy to clean up remote machine changes once you are done

One other small difference is that it launches Neovim server on the remote server and connects a UI to it locally. This does not amount to much right now, but I plan to work on neovim/neovim#24690 once I finish some of the missing features on this plugin. That should make the overall process equivalent to what remote SSH offers in VS Code.

Although, the plugin currently supports only SSH, as you can see in the README, plan is to support Docker, Devcontainer and k8s pods through the same interface.

Honestly, I would love more feedback on what people expect out of such a plugin and if you have any suggestions, do let me know.

@00sapo
Copy link
Author

00sapo commented Apr 28, 2024

Hi, thank you very much. Your plugin looks very promising. Honestly, I think the most important thing is to reduce the overhead connected with ssh in order to improve the performance on low quality connections. I guess that's something deeply connected with (and limited by) the nvim's client-server implementation. As of now, it doesn't look to be easy to send commands to a remote nvim instance that has a different configuration and that doesn't control the UI. If it would be possible, we could have a remote instance with the default configuration which modifies remotes files without having the plugins, lsp, etc installed. That's how vscode works...

@kedom1337
Copy link

First of all sorry for hijacking this issue but I have a few open questions which are at-least loosely related.

I have looked at another plugin which seems to do a similar thing as this one. One of the main issues with it, is the current inability of neovim, to attach an already running neovim instance to a server with --remote-ui. This leads, at-least in the plugin mentioned, to the workaround of opening a nested neovim instance. Here is the issue I opened in the neovim repo for the above, it also references the relevant issue in the mentioned plugin repo.

My question now is does this plugin suffer the same fate? Or am I fundamentally misunderstanding something?

@amitds1997
Copy link
Owner

amitds1997 commented May 27, 2024

My question now is does this plugin suffer the same fate? Or am I fundamentally misunderstanding something?

Since it's a Neovim limitation, there is sadly no getting around (as of now).

From how I understand it, none of the IDEs try to replace their existing windows, they infact, either launch a separate tab or window with the launched instance (or at least that's how I have observed it).

This is possible fairly easily by something like this. By specifying the callback, your new UI client can be launched as a separate tab in your terminal, a separate terminal window or if you like, as an instance of your GUI Neovim instance. This is actually how I use it quite regularly.

It's possible to detach the original Neovim instance from the launched Neovim instance but I haven't completely plugged it in since I could not find a good UX for offering that as a choice to the user. It should also be possible to close the original Neovim server post that if necessary, but that would be a bit cumbersome.

I might have not fully understood your use case so let me know just in case.

@kedom1337
Copy link

Makes sense. Opening it in a different terminal tab seems to be a nice solution, certainly much nicer than opening neovim within a neovim terminal, until neovim hopefully adds functionality for attaching a running instance. I also just wanted to say thanks for your plugin, people like you are what make neovim awesome.

@amitds1997 amitds1997 pinned this issue Jun 8, 2024
Repository owner locked and limited conversation to collaborators Jun 8, 2024
@amitds1997 amitds1997 converted this issue into discussion #145 Jun 8, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants