Zed editor: Difference between revisions

From NixOS Wiki
No edit summary
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
== Zed Editor ==
 
Zed is a graphical text editor focusing on speed and collaborative editing.
[https://zed.dev/ Zed] is a graphical text editor focusing on speed and collaborative editing.


Its Linux support is fairly recent, the NixOS support even more so.
Its Linux support is fairly recent, the NixOS support even more so.
Line 7: Line 7:
By default, Zed will try to download pre-build LSP servers in <code>~/.local/share/zed/languages/</code>. This obviously won't work for NixOS.
By default, Zed will try to download pre-build LSP servers in <code>~/.local/share/zed/languages/</code>. This obviously won't work for NixOS.


There's sadly no way to inject those from $PATH for now. Worse, the way to point to the language server is language-specific, there is no global configuration flag for now.
There's sadly no way to inject those from <code>$PATH</code> for now. Worse, the way to point to the language server is language-specific, there is no global configuration flag for now.


The following sections contain some language-specific setup working on NixOS.
The following sections contain some language-specific setup working on NixOS.
Line 23: Line 23:
  }
  }
</syntaxhighlight>
</syntaxhighlight>
[[Category:Software]]
[[Category:Applications]]
[[Category:Text Editor]]

Latest revision as of 19:07, 20 June 2024

Zed is a graphical text editor focusing on speed and collaborative editing.

Its Linux support is fairly recent, the NixOS support even more so.

LSP Support

By default, Zed will try to download pre-build LSP servers in ~/.local/share/zed/languages/. This obviously won't work for NixOS.

There's sadly no way to inject those from $PATH for now. Worse, the way to point to the language server is language-specific, there is no global configuration flag for now.

The following sections contain some language-specific setup working on NixOS.

Rust-analyzer

Here, we'll assume rust-analyzer is globally installed in your system profile at /run/current-system/sw/bin/rust-analyzer. You may want to adapt this path in the following code snippet to something more relevant to your use case.

Add the following snippet to your zed configuration file:

 "lsp": {
   "rust-analyzer": {
     "binary": {
       "path": "/run/current-system/sw/bin/rust-analyzer",
     },
   }
 }