Suggestion: Namespace suggestions
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 80
- Forks
- 47
- PR merge metrics
- No merged PRs in 30d
Description
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 --searchwhich 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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the LSP server's handling of Unbound errors (error code 2049), Code Actions, and the hh_client --search entry point. Review the proof-of-concept WIP branch linked in the issue to understand the existing behavior. Done means namespace suggestions appear as quick fixes for unresolved symbols, with the intended LSP integration covered.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, vscode
- Domain
- developer-experience, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100