News for hackers. Stuff that matters.
Re:Zed on Linux Is Here by jchw on Wednesday July 10, 2024 @01:53PM (#40929522)
Man, I'm conflicted. I mean, Zed works pretty damn well. So far my biggest annoyance with Zed though is that it's constantly trying to download language servers and other tools and run them. And sure, that's handy, but 1. I don't really want it, I'd much rather only use distribution-provided tools. 2. It doesn't work at all on NixOS, so it's just wasting its time and our bandwidth constantly downloading and trying to update binaries that will never run.

The thing is, I would just disable it, but you can't, as far as I can tell. There's this somewhat angry issue about it here:

https://github.com/zed-industries/zed/issues/12589

They might have a point but beyond whether or not they have a point regarding the fact that it automatically fetches binaries from the Internet, not having an option to disable it is just cruel.

I still like Zed a lot and I also have a big appreciation for the design of GPUI, which I think is a very well-designed UI library that puts focus on the important things. So, I hope it goes well.

Re:Zed on Linux Is Here by mikaylamaki on Wednesday July 10, 2024 @02:20PM (#40929781)
After we finished prepping this linux launch, we've started work on making this situation better. Follow along here: https://github.com/zed-industries/zed/pull/14034
Re:Zed on Linux Is Here by jchw on Wednesday July 10, 2024 @02:34PM (#40929928)
Oh, thank goodness. Yeah, that's going to be a major quality of life improvement for me. I had a feeling it'd eventually make its way into Zed eventually, but when I initially read the issue I was under the impression that there was no plans to add options around this, which I found confusing.
Re:Zed on Linux Is Here by brunoqc on Wednesday July 10, 2024 @02:41PM (#40930005)
> It doesn't work at all on NixOS

Doesn't it work with:

  zed-fhs = pkgs.buildFHSUserEnv {
    name = "zed";
    targetPkgs = pkgs:
      with pkgs; [
        zed-editor
      ];
    runScript = "zed";
  };

Still not ideal though.
Re:Zed on Linux Is Here by jchw on Wednesday July 10, 2024 @04:46PM (#40931315)
Oh sure, you can create an FHS and have it work, though personally I wouldn't. After all, Zed itself actually does work without an FHS, it's just that any binaries it tries to download will not. Which is actually not a huge problem in my case.
Re:Zed on Linux Is Here by 1attice on Wednesday July 10, 2024 @03:19PM (#40930414)
Weird, I just added `zed-editor` to my environment and it's fine.

NixOS is listed here: https://zed.dev/docs/linux

For me, works as expected.

Re:Zed on Linux Is Here by winternewt on Wednesday July 10, 2024 @04:19PM (#40931092)
I just tried it on NixOS 24.05. It starts, but nothing happens when I click "Open a project" or Ctrl+O. It's as if it lacks the ability to show a file selection dialog.
Re:Zed on Linux Is Here by ajitid on Wednesday July 10, 2024 @04:30PM (#40931175)
Re:Zed on Linux Is Here by winternewt on Wednesday July 10, 2024 @05:23PM (#40931612)
Apparently yes. I tried installing xdg-desktop-portal-gtk at first, but that didn't work. xdg-desktop-portal-kde did.

But now I get issues that are likely due to problems with downloading language server binaries and running them, as the parent comment indicated. When I open a Rust project it says "Language server rust-analyzer-2024-07-08 (id 1) status update: Failed to load workspaces."

Also, it dumps core every time I quit. :)

Re:Zed on Linux Is Here by jchw on Wednesday July 10, 2024 @05:03PM (#40931451)
This is almost definitely the problem they're facing although I think that description is a little bit odd. It's missing the operative word: "portals". It's the XDG desktop portals service that is involved here. What you need to ensure is that you have a desktop portal provider set up that provides org.freedesktop.impl.portal.FileChooser. What's kind of neat about the way xdg-desktop-portals is architected, you can pick and choose different implementations for different services. This is especially useful outside of desktop environments where you might need to use e.g. the wlr provider for screenshots and screen capture, but you still want e.g. KDE file dialogs.

It's unfortunate that the documentation for XDG desktop portals (and generally, setting up a complete desktop setup when using compositors like labwc or Sway) is relatively poorly documented. I have my feelings about the pervasiveness of DBus services everywhere but overall I like desktop portals.

Re:Zed on Linux Is Here by dindresto on Wednesday July 10, 2024 @05:18PM (#40931571)
NixOS 24.05 contains an older version of zed, as feature updates are generally not backported to stable NixOS releases. Try running the package from nixos-unstable instead.
Re:Zed on Linux Is Here by winternewt on Wednesday July 10, 2024 @05:40PM (#40931794)
Well that got rid of the core dump each time I quit, and it fixed the language server issues. So together with the portals configuration it seems to be working as well as it can.
Re:Zed on Linux Is Here by 1attice on Wednesday July 10, 2024 @06:15PM (#40932038)
[OP] yeah I'm using nixos-unstable too. I should have mentioned that
Re:Zed on Linux Is Here by zamalek on Thursday July 11, 2024 @01:18PM (#40938689)
There's also this, has AUR-style *-git packages: https://www.nyx.chaotic.cx
Re:Zed on Linux Is Here by benfrain on Wednesday July 10, 2024 @05:14PM (#40931535)
I really wish they would bundle up the basic Language Servers with the download (HTML, CSS, TypeScript) so it at least has parity with VSCode in this regard
Re:Zed on Linux Is Here by blub on Thursday July 11, 2024 @04:18AM (#40934631)
And with that all my interest is gone and I won’t bother with zed.

I highly recommend Little Snitch or opensnitch to protect oneself from rogue developers. Yes, anybody downloading things or uploading things without my consent is a rogue.

Re:Zed on Linux Is Here by andrepd on Thursday July 11, 2024 @07:06AM (#40935385)
If any zed devs are in this thread: I highly highly suggest that any auto-download or upload (be it telemetry, plugins being downloaded, and worse: plugins uploading god knows what) is opt-in or at the very least easy to opt-out.

The eagerness to download stuff without my consent at the moment precludes me from using this e.g. in a job that touches a sensitive proprietary codebase.

Re:Zed on Linux Is Here by VPenkov on Thursday July 11, 2024 @08:02AM (#40935735)
This is a non-starter for many larger companies. With supply chain attacks being what they are currently, this would directly prompt Security teams to block this outright.
Re:Zed on Linux Is Here by andrepd on Friday July 12, 2024 @01:45AM (#40942964)
Yes.

Even more importantly: I wouldn't use it in my personal machine :) I don't like my computer doing things without my permission.