Zed: Difference between revisions
m update, format, use native features |
enhancements: formatting, structure, simplification |
||
| Line 19: | Line 19: | ||
<!--T:1--> | <!--T:1--> | ||
[https://zed.dev Zed]<ref>Zed Industries, "Zed", Official Website, Accessed October 2025. https://zed.dev</ref> is a collaborative, GPU-accelerated text editor developed by Zed Industries. It combines fast local editing with real-time multiplayer features and ships with batteries-included tooling for popular programming languages. | [https://zed.dev Zed]<ref>Zed Industries, "Zed", Official Website, Accessed October 2025. https://zed.dev</ref> is a collaborative, GPU-accelerated text editor developed by Zed Industries. It combines fast local editing with real-time multiplayer features and ships with batteries-included tooling for popular programming languages. | ||
<!--T:2--> | <!--T:2--> | ||
The editor provides native builds for Linux, including Nixpkgs packages and a reproducible flake. Hardware acceleration requires a GPU with Vulkan support; systems without Vulkan can fall back to emulation via tools such as [https://github.com/nix-community/nixGL nixGL].<ref>Zed Industries, "Linux", Zed Documentation, Accessed October 2025. https://zed.dev/docs/linux</ref> | The editor provides native builds for Linux, including Nixpkgs packages and a reproducible flake. Hardware acceleration requires a GPU with Vulkan support; systems without Vulkan can fall back to emulation via tools such as [https://github.com/nix-community/nixGL nixGL].<ref>Zed Industries, "Linux", Zed Documentation, Accessed October 2025. https://zed.dev/docs/linux</ref> | ||
{{Nixpkg|pkgs/by-name/ze/zed-editor|zed-editor}} is available in Nixpkgs since 24.11; | |||
However, Zed provides [https://github.com/zed-industries/zed/blob/main/flake.nix an official nix flake] which might be useful if you need features that have not yet reached unstable Nixpkgs. | |||
== Installation == <!--T:3--> | == Installation == <!--T:3--> | ||
=== | The package installs both desktop launchers and a CLI entry point aliased to <code>zeditor</code>, mirroring the upstream binary name | ||
=== Imperative === <!--T:4--> | |||
==== Zed's Flake ==== | |||
</translate> | </translate> | ||
| Line 35: | Line 39: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
==== Nixpkgs ==== | |||
< | <syntaxhighlight lang="console"> | ||
nix run nixpkgs#zed-editor | |||
</syntaxhighlight> | |||
=== | <translate> | ||
=== Declarative === <!--T:7--> | |||
</translate> | </translate> | ||
==== NixOS ==== | |||
<syntaxhighlight lang="nix"> | <syntaxhighlight lang="nix"> | ||
environment.systemPackages = [ | environment.systemPackages = [ | ||
pkgs.zed-editor | pkgs.zed-editor | ||
]; | ]; | ||
</syntaxhighlight> | |||
{{Evaluate}} | |||
==== Home Manager ==== | |||
<syntaxhighlight lang="nix"> | |||
home.packages = [ | home.packages = [ | ||
pkgs.zed-editor | pkgs.zed-editor | ||
]; | ]; | ||
</syntaxhighlight> | |||
<syntaxhighlight lang="console"> | |||
home-manager switch | |||
</syntaxhighlight> | </syntaxhighlight> | ||
<translate> | <translate> | ||
==== Zed's Flake ==== <!--T:9--> | |||
==== Flake ==== <!--T:9--> | |||
</translate> | </translate> | ||
<syntaxhighlight lang="nix"> | <syntaxhighlight lang="nix"> | ||
inputs.zed.url = "github:zed-industries/zed"; | { | ||
inputs.zed.url = "github:zed-industries/zed"; | |||
outputs = { self, nixpkgs, zed, ... }@inputs: let | outputs = | ||
{ | |||
self, | |||
in { | nixpkgs, | ||
zed, | |||
}; | ... | ||
}@inputs: | |||
let | |||
system = "x86_64-linux"; | |||
pkgs = import nixpkgs { inherit system; }; | |||
in | |||
{ | |||
packages.${system}.zed-latest = zed.packages.${system}.default; | |||
}; | |||
} | |||
</syntaxhighlight> | </syntaxhighlight> | ||
| Line 81: | Line 98: | ||
<!--T:11--> | <!--T:11--> | ||
Build the flake package with <code>nix build .#zed-latest</code> or expose it in your configuration with the appropriate overlay. | Build the flake package with <code>nix build .#zed-latest</code> or expose it in your configuration with the appropriate overlay. | ||
{{Warning|Zed requires hardware-accelerated Vulkan. On systems without supported drivers, use <code>nixGL</code> or home-manager's <code>nixGL.vulkan.enable {{=}} true;</code> to provide the necessary libraries. | {{Warning|Zed requires hardware-accelerated Vulkan. On systems without supported drivers, use <code>nixGL</code> or home-manager's <code>nixGL.vulkan.enable {{=}} true;</code> to provide the necessary libraries. | ||
Providing Vulkan through <code>nixGL</code> can be more consistent than relying on host distribution packages, especially on non-NixOS systems where Wayland and X11 stacks differ in their Vulkan capabilities.}} | |||
Providing Vulkan through <code>nixGL</code> can be more consistent than relying on host distribution packages, especially on non-NixOS systems where Wayland and X11 stacks differ in their Vulkan capabilities. | |||
== Configuration == <!--T:13--> | == Configuration == <!--T:13--> | ||