Community
Participate
Working Groups
In the following code: void foo() { b(//here A completion at the indicated possition will result in: void foo() { bbreak
Created attachment 59656 [details] proposed patch The KeywordCompletionContributor is hooked into the LegacyCompletionProposalComputer which moves the parse offset to the left of the left parenthesis, which is why "b" is used as a prefix rather than nothing at all. This patch ports the KeywordCompletionContributor to the new completion proposal computer extension point so that it can use the invocation offset rather than the parse offset to find keyword completions. This patch also ports the last of the legacy completion contributors, HelpCompletionContributor, to the new extension point.
Patch breaks preprocessor keyword completions. I'll revise it when I find the time.
Created attachment 59707 [details] revised patch The pound symbol was not being included in the prefix for preprocessor completions.
I am happy to look at it!
Committed to HEAD. The keyword completion failure reminded me that the legacy completionContributors should not be invoked at all for context information. I added a check to the LegacyCompletionProposalComputer to avoid the same problem with other implementations. As a follow-up, I would like to move the HelpCompletionProposalContributor into a new proposal computer category, e.g. "Documentation proposals".