extensions icon indicating copy to clipboard operation
extensions copied to clipboard

possible for a language theme to use a language server not available on github?

Open mattly opened this issue 1 year ago • 1 comments

Check for existing issues

  • [X] Completed

Misc notes

I am attempting to create a language extension for fennel, but the good lsp that I'd like to use is on SourceHut and not mirrored to GitHub. Briefly looking through Zed's code, it seems the way to go looking for language servers is via zed::latest_github_release; I understand that this is both easy and popular, but it strikes me as being woefully incomplete that I can't pull a language server from source code hosting that is not this site.

mattly avatar Aug 13 '24 06:08 mattly

The function used to download the language server assets is agnostic to any form of hosting service: https://docs.rs/zed_extension_api/latest/zed_extension_api/fn.download_file.html

In v0.1.0 of the zed_extension_api we now ship a generic HTTP client which can be used to fetch from arbitrary sources: https://docs.rs/zed_extension_api/latest/zed_extension_api/http_client/fn.fetch.html

If SourceHut has an API for listing releases and their assets then it should be able to be called from within an extension using fetch.

maxdeviant avatar Aug 23 '24 02:08 maxdeviant