zed icon indicating copy to clipboard operation
zed copied to clipboard

Load the LSP from workspace in language extension

Open chungweileong94 opened this issue 1 year ago • 1 comments

Check for existing issues

  • [X] Completed

Describe the feature

Some extension needs to load the LSP installed in the workspace, if not fallback to the global installed LSP.

For example: The biome extension needs to be able to load the LSP binary installed in the workspace, if not install and fallback to a global LSP binary.

However, it doesn't seem like we are able to check if an LSP binary exists in the workspace, as things like Path::exists don't really work (probably because of wasm?).

I also tried to use worktree.read_text_file() to see if the node_modules/@biomejs/biome/package.json exists in the workspace, it works sometimes but mostly doesn't work. https://github.com/biomejs/biome-zed/pull/9

If applicable, add mockups / screenshots to help present your vision of the feature

No response

chungweileong94 avatar Apr 19 '24 05:04 chungweileong94

AIUI this is also necessary for Android development where you need a project-specific version of gradle.

jansol avatar Apr 20 '24 16:04 jansol