-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Remote code editing via distant
#3721
Comments
Wouldn't using something like sshfs to mount the remote fs be sufficient? |
@archseer, here's some of the primary differences that come to mind at the moment:
There are other technical differences, but the distinctions above are - at the moment - the differences that stand out. In some cases, using sshfs might be preferred, but for my use personally and at work this is the preferred method as language servers and other utilities cannot be run locally. :) If you want to think of what this more closely relates to, then take a look at VS Code Remote Development or the formerly-active Nuclide. |
I don't know anything about distant. But I regularly use vscode remote. As helix is more of a tui text editor wouldn't it make more sense to install it on your dev server and ssh into it? I know sshfs was mentioned but why not just plain old ssh? For reference the vscode-remote server is already bigger than the helix editor. I'm curious as to what use case you couldn't meet by doing this. I think the case for vscode-remote is a little different as it is a web-based GUI rather than a TUI. It might be worth considering in more detail when/if helix gets a GUI? EDIT: I'm not a dev here, just a curios user. |
@silvergasp good questions! The remote code functionality is agnostic to whether you use it with a terminal editor or a graphical editor. Now, you bring up a good point about an advantage of terminal editors is that you can install and run them on remote machines more easily than a graphical editor. The reasons that I've found a solution like this preferred - and many of my coworkers as well - are that the latency of your network doesn't affect your typing experience and similarly disruptions of your network don't fully block you from editing. I worked on a bus to and from work for many years before 2020 and the network reliability was poor, causing tools like ssh to yield a broken pipe and mosh to freeze frequently waiting for the connection to re-establish. In contrast, VS Code's remote development feature let me continue working on a file without having my cursor and text freeze as I went in-and-out of networks. For some of my colleagues, they live and work in locations where networks are poor, meaning that they cannot maintain a reliable ssh connection and mosh causes their editing experience to be nearly unusable as it frequently would cut out for ~10-15 seconds. |
Oh, and while this may not be as relevant to Helix, another reason is to avoid needing to copy your configuration files over to another machine. With ssh, to get the same experience with your editor, you have to copy your configuration files and plugins over to the other machine. In contrast, VS Code's remote editor and other offerings like distant let you avoid that and maintain your configurations on your local machine, only outsourcing programs and source code to the remote machine. |
Oh yeah, that seems reasonable. I'd definitely be keen on an improvement in latency/consistency! |
Tentatively marking as a plugin unless otherwise changed. |
I use SSHFS at work with Helix and it's almost enough to make me contemplate going back to VS Code (for work) 😆 The connection is stable, the main issue is I can't use the file picker or global search because there are so many files on the remote server it hangs Helix for minutes at a time, sometimes even crashing it. Even just typing |
Not to hand wave the issue, because there is room for improvement there, but this sounds unusual. Are you sure there isn't a problem with IO on your server? |
Yeah, we route our network through a VPN which isn't the fastest, which will definitely slow things down. But even then I added an exception out of curiosity and while it was noticeably faster, was still unusable in the grand scheme of things. For context, opening the file picker in the fully cloned local repository takes around a second. So it's definitely a large repo. But I tried some more manageably-sized repos and it was still pretty sluggish. |
Hi all, just curious if there have been any updates on this issue. I love Helix and am very interested in using this feature. |
I haven't revisited yet. Distant is maturing more and more over time. One of the last major features was persistent connections, meaning that if you lose your connection with the remote machine, it will be able to reconnect later without any extra work or reauthentication from the user's side. I'd be happy to work with someone on the helix side to integrate this. Either by just supporting the client-component of the library, or even making it where having helix on both machines would let you set up helix as a server for other helix instances to connect to. Either way, going to let the folks from the helix side reach out if there's interest and availability. :) |
I have another use case for this. I have to access servers that are on the other side of the planet. The latency between my machine and the server is often higher than 300 ms. This can be very annoying while trying to type on a terminal-based IDE, like Helix. The remote feature proposed by this issue has the potential to ameliorate these latency issues. |
I also see a benefit to this. I have a remote environment running on Amazon Linux 2 that comes packaged with glibc 2.26 As a result, helix can't be run natively there so support for running it remotely from my actual device would be a super handy workaround. |
Another benefit would be for development on older systems that cannot support helix. I am using debian 9 (I know, don't tell me it sucks), and literally cannot install it. Would be nice if I could ssh into the system with helix. |
helix runs just fine on older systems you just have to compile it yourself. |
I might be a bit of an idiot, but I blew up (boot loader went bye bye) a system trying to get a new enough version of c++ to compile helix onto that system. My resolution was just to give up trying to get helix to run on debian 9. |
That shuldn't happen. iiirc all C++ compilers released since 2015 rhold support everything we need so I am surprised it doesn't work out to the box. It can be a bit of a pain to get newer compiler sunning but I bootstrapped clang-15 on centos 7 so it's definitely possible. There are probably existing docker images for this. I would not recommend messing with a live system. I use this docker image to build my other rust projects for ancient glibc versions. I am not sure if it has everything helix has but you could try that if you don't find anything else |
Since potentially many of us are subscribed to the issue to see updates on the remote functionality, I kindly ask you to move unrelated discussions somewhere else to avoid unnecessary notifications for everybody. |
Zed is now open source. |
Zed doesn't have remote code editing either: zed-industries/zed#5347 |
Zed does have good collab editing, tho. |
Zed is GPL and based on the Matrix conversation we can't reference it at all without polluting Helix's licensing. |
Lapce has a remote code editing support although Lapce itself is not stable yet. |
If you guys want an alternative to sshfs that doesnt freeze up whenever you use the file picker, check this out, seems particularly good for this case! It is just a workaround for now, but still might help out https://github.com/kahing/catfs/ |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Curious if there's been any thought to offering remote code editing support similar to https://code.visualstudio.com/docs/remote/remote-overview.
I've been working on a project for a couple of years called distant with a plugin (distant.nvim) geared to leverage it to introduce remote coding editing support to neovim.
Since helix is written in Rust, it could leverage directly the libraries that distant offers to enable remote editing - including remote LSPs and shells - through both
ssh
and the distant protocol.The text was updated successfully, but these errors were encountered: