rzukic / zed-latex

32 stars 4 forks source link

Download texlab if not found #23

Closed lnay closed 1 month ago

lnay commented 1 month ago

There's a precedent in other Zed extensions to download and update the language servers, as done for Zig here. For LaTeX in particular, texlab as an executable is very decoupled from the compiler and the only benefit to installing it globally is to share between different editors, and most editors do not use texlab.

Implementation notes:

The release downloads for texlab on GitHub follow the format: https://github.com/latex-lsp/texlab/releases/download/<RELEASE>/texlab-<ARCH>-<OS>.tar.gz

For example the first download link on the latest texlab release is: https://github.com/latex-lsp/texlab/releases/download/v5.19.0/texlab-aarch64-linux.tar.gz

The Zed extension API provides helper functions for downloading and finding latest release of a repo. Overall, I imagine that the implementation fol zls linked to above could be copied almost completely.

lnay commented 1 month ago

Correction: for windows, it has a .zip extension instead of .tar.gz.

lnay commented 1 month ago

Sorted by #26