Zed: Difference between revisions

Clarify nixGL wrapper is needed for Zed.
Pigs (talk | contribs)
m Hyperlink package, home manager, and vulkan. Fix console formatting
 
Line 5: Line 5:


== Installation ==
== Installation ==
The package zed-editor is available only from channel 24.11 onward.
The package {{nixos:package|zed-editor}} is available only from channel 24.11 onward.


CLI support is installed and aliased to <code>zeditor</code>
CLI support is installed and aliased to <code>zeditor</code>


Zed requires a GPU with Vulkan support, otherwise it will prompt you to use a very inefficient "emulated GPU" mode. This is available thru `nixGL` by using the Vulkan wrappers, or via home-manager nixGL integration by setting the <code>nixGL.vulkan.enable = true</code>.   
Zed requires a GPU with [[Graphics#Vulkan|Vulkan]] support, otherwise it will prompt you to use a very inefficient "emulated GPU" mode. This is available thru `nixGL` by using the Vulkan wrappers, or via home-manager nixGL integration by setting the <code>nixGL.vulkan.enable = true</code>.   
On non-NixOS systems this method of providing Vulkan support via NixGL has even been demonstrated that it can be more consistent/stable than relying on native host system support. The Vulkan libraries of Ubuntu 24.04 for example don't provide the same level of support between X11 and Wayland environments, and don't meet the Zed minimum Vulkan API requirements under X11, but the nixGL wrapper with Vulkan support does (for a GPU that actually supports the features).
On non-NixOS systems this method of providing Vulkan support via NixGL has even been demonstrated that it can be more consistent/stable than relying on native host system support. The Vulkan libraries of Ubuntu 24.04 for example don't provide the same level of support between X11 and Wayland environments, and don't meet the Zed minimum Vulkan API requirements under X11, but the nixGL wrapper with Vulkan support does (for a GPU that actually supports the features).


Line 36: Line 36:


:<syntaxhighlight lang="console">
:<syntaxhighlight lang="console">
➜  ~ ls .zed_server
$ ls ~/.zed_server
zed-remote-server-stable-0.169.2
zed-remote-server-stable-0.169.2
➜  ~ file .zed_server/zed-remote-server-stable-0.169.2
$ file ~/.zed_server/zed-remote-server-stable-0.169.2
.zed_server/zed-remote-server-stable-0.169.2: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), static-pie linked, BuildID[sha1]=b1ac2c83127e7a9a072840cd7c24d7d125c1b655, not stripped
.zed_server/zed-remote-server-stable-0.169.2: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), static-pie linked, BuildID[sha1]=b1ac2c83127e7a9a072840cd7c24d7d125c1b655, not stripped
➜  ~ ldd .zed_server/zed-remote-server-stable-0.169.2
$ ldd ~/.zed_server/zed-remote-server-stable-0.169.2
statically linked
statically linked
</syntaxhighlight>
</syntaxhighlight>
Line 69: Line 69:


== Home manager support ==
== Home manager support ==
Zed is supported by home-manager, which allows you to make a reproducible initial Zed setup.   
 
Zed is supported by [[Home Manager]], which allows you to make a reproducible initial Zed setup.   
However, due to the method Zed uses for installing, running, and managing Extensions, only the initial set of preinstalled extensions can currently be defined in home-manager. It's possible to install additional extensions from the Zed GUI on any system without including it in the home-manager config. This is partially a technical limitation of the format of extensions (which follow a similar model to VSCode and require external binaries to be downloaded and used at run-time}, and a Zed extensions management design (that doesn't track the installed extensions in the settings but does allow a list to be manually added that will be auto-installed if not already present).   
However, due to the method Zed uses for installing, running, and managing Extensions, only the initial set of preinstalled extensions can currently be defined in home-manager. It's possible to install additional extensions from the Zed GUI on any system without including it in the home-manager config. This is partially a technical limitation of the format of extensions (which follow a similar model to VSCode and require external binaries to be downloaded and used at run-time}, and a Zed extensions management design (that doesn't track the installed extensions in the settings but does allow a list to be manually added that will be auto-installed if not already present).