hide-org / hide

🤖 Headless IDE for AI agents
https://hide.sh
MIT License
129 stars 5 forks source link

Failed to start language server #100

Closed prabhuteja12 closed 1 month ago

prabhuteja12 commented 2 months ago

Hello! I'm trying to use your package with the hide-py SDK. When running the examples provided, I'm running to the following error

ERR pkg/lsp/service.go:62 > Failed to start language server error="exec: \"pyright-langserver\": executable file not found in $PATH"
WRN pkg/project/manager.go:167 > Failed to start LSP server. Diagnostics will not be available. error="Failed to start language server: exec: \"pyright-langserver\": executable file not found in $PATH"

I have tried adding pip install pyright to onCreateCommand but that didn't help too.

Can you please help with this?

Thank you!

artmoskvin commented 2 months ago

@prabhuteja12 Hey! Try running pip install pyright on your local machine instead. Currently, hide starts language servers outside of devcontainers, so installing them using onCreateCommand won't help.

Alternatively, you can install hide runtime using brew install artmoskvin/hide/hide. This will install all the supported language servers.

prabhuteja12 commented 2 months ago

Great! I installed pyright, and now the error message has changed:

erver error="jsonrpc2: connection is closed" languageId=python projectId=...
prabhuteja12 commented 2 months ago

Ok. Solved this by installing the dependencies as listed in https://github.com/artmoskvin/homebrew-hide/blob/main/Formula/hide.rb#L8.

Boiled down to running:

pip install pyright
npm install -g typescript-language-server typescript
go install golang.org/x/tools/gopls@latest

in the base conda environment after conda install conda-forge::nodejs

artmoskvin commented 2 months ago

Glad to hear it worked out! I'll update the docs with instructions for how to install language servers manually. We also have some work planned to improve the init process after installation https://github.com/artmoskvin/hide/issues/81

Just curious, was there any reason for why you didn't use brew? Is it just not your thing or it didn't work?

prabhuteja12 commented 1 month ago

Glad to hear it worked out! I'll update the docs with instructions for how to install language servers manually. We also have some work planned to improve the init process after installation #81

Great! That would be useful, especially that the website also mentions installing from source.

why you didn't use brew? Is it just not your thing or it didn't work?

I was trying to get this to work on Linux. So I preferred installing from source.

I'll leave this issue open for now, so that you can track the task of adding documentation. You can close this, if you feel otherwise.

Thank you!

artmoskvin commented 1 month ago

The docs are updated.