Skip to content
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

Package request: Code-Editor Zed #284064

Closed
boustanihani opened this issue Jan 26, 2024 · 12 comments
Closed

Package request: Code-Editor Zed #284064

boustanihani opened this issue Jan 26, 2024 · 12 comments
Labels
0.kind: packaging request Request for a new package to be added

Comments

@boustanihani
Copy link

Package request: Code-Editor Zed

Linux support is coming:
zed-industries/zed#5395

Hope that we also get a Nix package when that happens :)

Official page is: https://zed.dev/

@boustanihani boustanihani added the 0.kind: packaging request Request for a new package to be added label Jan 26, 2024
@jtbx
Copy link
Member

jtbx commented Jan 26, 2024

There's already a pull request for it, see #284010
Currently it only adds support for Darwin.

@boustanihani
Copy link
Author

Thanks, didn't notice, I'll close this issue.

@muneebusmani
Copy link

this needs to be opened because zed isnt still available for linux

@boustanihani boustanihani reopened this Jan 26, 2024
@eclairevoyant

This comment was marked as outdated.

@michaelCTS
Copy link

That's now untrue @eclairevoyant https://github.com/zed-industries/zed/blob/main/docs/src/developing_zed__building_zed_linux.md

@YarekTyshchenko
Copy link
Contributor

YarekTyshchenko commented Apr 12, 2024

PR #284010 does add support for linux now (nixos), but not all things work yet. It might be worth opening an issue listing all the broken things

@tv42
Copy link

tv42 commented May 4, 2024

The PR is merged, and zed-editor in nixpkgs seems to work well enough on Linux (NixOS) these days.

I had to ln -s $(which rust-analyzer) ~/.config/zed/languages/rust-analyzer/rust-analyzer-2024-04-29 to get the Rust language support working, I think that's the usual thing where silly upstreams download executables from the internet and expect them to work right. And Zed's error handling for that kinda sucked, it can get stuck in a loop.

There's some obvious bugs like Zed will crash if you push key combinations that don't exist on macOS, but I've done hours of programming with it already.

I think this issue can be closed, and more specific issues opened for the rest of the work.

@amytimed
Copy link

amytimed commented May 6, 2024

cant copilot
image
image
is that a packaging issue

@tv42
Copy link

tv42 commented May 11, 2024

Update to earlier, putting a rust-analyzer symlink in ~/.config/zed/languages/rust-analyzer still makes their upgrade checks run, crap out, and remove or ignore your file.

Instead, you have to put this in ~/.config/zed/settings.json:

  "lsp": {
    "rust-analyzer": {
      "binary": {
	"path": "/nix/store/vlq2srikjqhkv57jx6pa198g8zxr9ajr-rust-analyzer-2024-04-29/bin/rust-analyzer",
      },
    },
  },

I haven't yet figured out a way to do that without hardcoding the path there -- hot mess, I need to update the config every now and then, especially if one needs different rust-analyzer versions for different projects. I'm assuming it'll need code changes. https://github.com/zed-industries/zed/blob/f550f23b97bcb0d900d7c321af7d91d52d97160e/crates/languages/src/rust.rs#L36 is the code path that undocumented config triggers.

@davidak
Copy link
Member

davidak commented May 16, 2024

There is a package, but it does not work (for me). #312266

@davidak davidak closed this as completed May 16, 2024
@patka-123
Copy link
Contributor

Update to earlier, putting a rust-analyzer symlink in ~/.config/zed/languages/rust-analyzer still makes their upgrade checks run, crap out, and remove or ignore your file.

Instead, you have to put this in ~/.config/zed/settings.json:

  "lsp": {
    "rust-analyzer": {
      "binary": {
	"path": "/nix/store/vlq2srikjqhkv57jx6pa198g8zxr9ajr-rust-analyzer-2024-04-29/bin/rust-analyzer",
      },
    },
  },

I haven't yet figured out a way to do that without hardcoding the path there -- hot mess, I need to update the config every now and then, especially if one needs different rust-analyzer versions for different projects. I'm assuming it'll need code changes. https://github.com/zed-industries/zed/blob/f550f23b97bcb0d900d7c321af7d91d52d97160e/crates/languages/src/rust.rs#L36 is the code path that undocumented config triggers.

You can also link to rust-analyzer like this: "path": "/etc/profiles/per-user/patka/bin/rust-analyzer"
So you don't have to update the store path everytime you do an update.

@nxy7
Copy link

nxy7 commented May 23, 2024

Update to earlier, putting a rust-analyzer symlink in ~/.config/zed/languages/rust-analyzer still makes their upgrade checks run, crap out, and remove or ignore your file.
Instead, you have to put this in ~/.config/zed/settings.json:

  "lsp": {
    "rust-analyzer": {
      "binary": {
	"path": "/nix/store/vlq2srikjqhkv57jx6pa198g8zxr9ajr-rust-analyzer-2024-04-29/bin/rust-analyzer",
      },
    },
  },

I haven't yet figured out a way to do that without hardcoding the path there -- hot mess, I need to update the config every now and then, especially if one needs different rust-analyzer versions for different projects. I'm assuming it'll need code changes. https://github.com/zed-industries/zed/blob/f550f23b97bcb0d900d7c321af7d91d52d97160e/crates/languages/src/rust.rs#L36 is the code path that undocumented config triggers.

You can also link to rust-analyzer like this: "path": "/etc/profiles/per-user/patka/bin/rust-analyzer" So you don't have to update the store path everytime you do an update.

This only works if you install things via nix profile install right? Won't be useful with devshells and other methods. I'm wondering if zed could follow helix here which to my knowledge checks if things are in path (at least as a fallback?) instead of looking into specific directory. I think it makes managing such dependencies much easier.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: packaging request Request for a new package to be added
Projects
None yet
Development

No branches or pull requests