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

Improve chain completions #2935

Closed

Conversation

gayanper
Copy link
Contributor

@gayanper gayanper commented Oct 28, 2023

The PR improve how the chain completions are transformed into CompletionItems by

  • Reusing the same logic which is used for normal completions with minor modifications to support special cases in chain completions.
  • This change add support for javadoc on the chain completion edge symbol as well.
  • Add more unit tests for chain completions.

@gayanper
Copy link
Contributor Author

@snjeza @rgrunber Let me know what you think

@gayanper gayanper force-pushed the improve-chain-completions branch 3 times, most recently from ee83790 to df1ecfc Compare October 29, 2023 10:22
@gayanper gayanper force-pushed the improve-chain-completions branch from df1ecfc to 702ae60 Compare November 5, 2023 17:34
@gayanper gayanper force-pushed the improve-chain-completions branch from 702ae60 to 4203be6 Compare November 12, 2023 20:23
@gayanper
Copy link
Contributor Author

@rgrunber what do think about this change ?

@gayanper gayanper force-pushed the improve-chain-completions branch from 4203be6 to abeeeda Compare March 21, 2024 17:12
@gayanper
Copy link
Contributor Author

@rgrunber WDYT about this PR ?

@rgrunber
Copy link
Contributor

I think it should be fine to customize the chain completion rendering with this logic. The only part that I would want to look closely at is the isChainCompletion check. Is it really the case that no other completions have dots that would wrongly be included in this ? Also chain completions are generated as CompletionItem. CompletionProposal comes from the underlying completion engine, and I don't think they would ever show up there. I'd have to have a look.

@gayanper
Copy link
Contributor Author

Also chain completions are generated as CompletionItem. CompletionProposal comes from the underlying completion engine, and I don't think they would ever show up there. I'd have to have a look.

This was done to reuse the existing logic for creating the completion rendering. Since the existing login in so closely tight with CompletionProposal I decided to use them even though I'm also not happy with that decision.

We could of course decouple completion item rendering logic from CompletionProposal by extracting a contract for required information and decorating the CompletionProposal from underlying completion engine. This will provide us the opportunity to do the same with chain completions without trying to create CompletionProposals for them.

Do you think that kind of a change will be beneficial for JDT.LS ?

@gayanper
Copy link
Contributor Author

gayanper commented Jun 7, 2024

@rgrunber any feedback ?

@gayanper gayanper force-pushed the improve-chain-completions branch 2 times, most recently from 04e66ed to d36086e Compare July 15, 2024 17:47
@rgrunber
Copy link
Contributor

rgrunber commented Sep 3, 2024

@gayanper , can this change be closed or is there something here still needing to be merged ?

@gayanper
Copy link
Contributor Author

gayanper commented Sep 4, 2024

@gayanper , can this change be closed or is there something here still needing to be merged ?

I will check and get back. I need to check if javadoc is working with what we have right now.

@gayanper gayanper closed this Sep 7, 2024
@gayanper gayanper force-pushed the improve-chain-completions branch from d36086e to d1a53b1 Compare September 7, 2024 19:17
@gayanper gayanper deleted the improve-chain-completions branch September 7, 2024 19:18
@gayanper
Copy link
Contributor Author

gayanper commented Sep 8, 2024

@rgrunber I think we can close this and I did accidentally closed it mixing up with a another PR, but I now confirmed that this PR is not needed anymore.

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

Successfully merging this pull request may close these issues.

2 participants