Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use LSP support in HHVM 3.23+ #15

Closed
fredemmott opened this issue Oct 26, 2017 · 8 comments
Closed

Use LSP support in HHVM 3.23+ #15

fredemmott opened this issue Oct 26, 2017 · 8 comments

Comments

@fredemmott
Copy link
Contributor

in master, hh_client lsp gets you a vscode LSP server

if you're on mac, you can get a recent enough build of HHVM/hh_client by following facebookarchive/nuclide#1358 (comment)

@PranayAgarwal
Copy link
Contributor

🎉 Been waiting for this. BTW is there a good way to know the version of hh_client the machine is using? hh_client --version isn't too useful for this, and I don't want to break pre-3.23 versions.

@ljw1004
Copy link

ljw1004 commented Oct 26, 2017

hh_client --version --json was introduced in 3.15. Currently as of 3.18 it outputs "api_version":4. Once I'm happy that LSP support is good enough to leave beta then I'll bump it up to "api_version":5 (aiming for v3.23 out on Nov17th). Clients can then rely that if api_version>=5 then they can use LSP.

PS. @PranayAgarwal I'd love to know -- what are you using it for?

@PranayAgarwal
Copy link
Contributor

Hi @ljw1004, this is for the Hack extension for Visual Studio Code published at https://marketplace.visualstudio.com/items?itemName=pranayagarwal.vscode-hack. I want to selectively switch newer clients to use hh_client in LSP mode, while older ones will continue to call the various IDE-related commands and parse the output.

@PranayAgarwal
Copy link
Contributor

I just released v0.6.1 of the extension which has optional language server support. It is turned off by default for now, so if you're on HHVM 3.23+ add "hack.useLanguageServer": true to your settings and reload the workspace.

Logs go to the "Output" pane -> "Hack Language Server" source in the dropdown filter.

If all goes well, I'll turn it on by default in a future version.

@fredemmott
Copy link
Contributor Author

Are there any twitter release announcments I can put out on @hacklang? :)

@fredemmott
Copy link
Contributor Author

FYI, Nuclide 0.275's switched over, with an opt-out in settings.

@PranayAgarwal
Copy link
Contributor

Awesome, I'll set LSP as default for VS Code as well in the next version.

@PranayAgarwal
Copy link
Contributor

This was enabled by default in a17cf92.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants