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

Suggestion: Namespace suggestions #112

Open
yucombinator opened this issue Oct 14, 2020 · 0 comments
Open

Suggestion: Namespace suggestions #112

yucombinator opened this issue Oct 14, 2020 · 0 comments

Comments

@yucombinator
Copy link
Member

I created a proof of concept that uses hhvm --search and Code Actions to provide a (rudimentary) namespace suggestions for unresolved symbols.

Demo here: https://imgur.com/S9zeQue

How it works:

  • Every time we see a Unbound error (error code 2049) we take the code producing the error and pass it to hh_client --search which gives us a list of matches

  • Each of the match is added to the list of quickfix actions, and shows up when the user hovers over the error in the IDE

  • Clicking on one of the quick fix actions will append the namespace before the term.

Ideally this functionality can be added to hh_client LSP server and potentially used for autocompletion. I can clean this up and make a PR but the code behind the demo can be find in its WIP here.

cc: @Wilfred

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

1 participant