Zed: Difference between revisions
No edit summary |
m Added information about CLI support and alias |
||
(9 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
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. | ||
== | == Installation == | ||
The package zed-editor is available only from channel 24.11 onward. | |||
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. | CLI support is installed and aliased to <code>zeditor</code> | ||
== LSP Support == | |||
By default, Zed will try to download pre-built LSP servers in <code>~/.local/share/zed/languages/</code>. This does not work for NixOS. | |||
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. | ||
=== | === rust-analyzer === | ||
Here, we'll assume rust-analyzer is globally installed in your system profile at <code>/run/current-system/sw/bin/rust-analyzer</code>. You may want to adapt this path in the following code snippet to something more relevant to your use case.<syntaxhighlight lang="json"> | Here, we'll assume rust-analyzer is globally installed in your system profile at <code>/run/current-system/sw/bin/rust-analyzer</code>. 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:<syntaxhighlight lang="json"> | |||
"lsp": { | "lsp": { | ||
"rust-analyzer": { | "rust-analyzer": { | ||
"binary": { | "binary": { | ||
"path": "/run/current-system/sw/bin/rust-analyzer", | "path": "/run/current-system/sw/bin/rust-analyzer", | ||
}, | }, | ||
Line 22: | Line 28: | ||
} | } | ||
</syntaxhighlight> | </syntaxhighlight> | ||
[[Category: | [[Category:Applications]] | ||
[[Category:Text Editor]] |
Latest revision as of 12:11, 30 September 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.
Installation
The package zed-editor is available only from channel 24.11 onward.
CLI support is installed and aliased to zeditor
LSP Support
By default, Zed will try to download pre-built LSP servers in ~/.local/share/zed/languages/
. This does not 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",
},
}
}