redhat-developer / redhat-developer/lsp4ij
Completions that are effectively code-generated overrides aren't inserted properly
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 344
- Forks
- 113
- Avg merge
- 5h 22m
- Merged PRs (30d)
- 15
Description
Some LSP-provided completions are intended to behave as code generation, e.g., implementing/overriding a method from an interface/base class. When I accepted such a completion, it resulted in invalid code, e.g., HTMLElement.click() in JavaScript/TypeScript which results in:
click(): void {
$0
\}()
Here's a demonstration of the issue:
It looks like it's just a current limited handling of templatized completion results.
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 by reproducing the JavaScript/TypeScript completion example and trace how LSP templatized completion results are inserted. Done means accepting code-generated override or implementation completions produces valid code rather than leaving an invalid trailing call syntax.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, javascript, typescript
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100