Zed: Difference between revisions

Layer-09 (talk | contribs)
mNo edit summary
Merrkry (talk | contribs)
 
Line 252: Line 252:
<translate>
<translate>
<!--T:22-->
<!--T:22-->
Zed downloads language servers into <code>~/.local/share/zed/languages/</code>, which is read-only on NixOS. Instead, use declarative methods to supply LSP binaries.
Zed downloads LSP servers into <code>~/.local/share/zed/languages/</code>. These binaries most likely will not work because of linking issues. You can workaround this with the following methods or bring your own LSP servers.
</translate>
</translate>
<translate>
<translate>
<!--T:23-->
<!--T:23-->
Check <strong>LSP Logs → Server Info</strong> to confirm which binaries are running. Prefer language servers packaged in Nixpkgs so that dependencies are resolved within the Nix store.
Check <strong>LSP Logs → Server Info</strong> to confirm which binaries are running.
</translate>
</translate>


Line 262: Line 262:
<translate>
<translate>
<!--T:24-->
<!--T:24-->
Enable [[FAQ#I've downloaded a binary, but I can't run it, what can I do?|<code>nix-ld</code>]] so prebuilt language servers can resolve dynamic libraries without wrapping.
Enable [[FAQ#I've downloaded a binary, but I can't run it, what can I do?|<code>programs.nix-ld</code>]] so language servers downloaded by Zed can resolve dynamic libraries without wrapping and work out of the box.
</translate>
</translate>


Line 273: Line 273:
<translate>
<translate>
<!--T:26-->
<!--T:26-->
Remember that language servers started inside the wrapper do not automatically inherit tools from ad-hoc shells; include every dependency declaratively.
Remember that language servers started inside the wrapper do not inherit tools and libraries from nix shell. This is usually not desired because LSP may need project-level dependencies provided by nix-shell to compile and analyze the code.
</translate>
</translate>


Line 303: Line 303:
Adjust the path for each language server you manage. The example above assumes rust-analyzer is installed in your system profile.
Adjust the path for each language server you manage. The example above assumes rust-analyzer is installed in your system profile.
</translate>
</translate>
== Remote server ==
== Remote server ==
<translate>
<translate>