-
-
Notifications
You must be signed in to change notification settings - Fork 117
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
KeywordCompletor: complete statement keywords #2622
base: master
Are you sure you want to change the base?
KeywordCompletor: complete statement keywords #2622
Conversation
If you are already on that topic would mind also adding |
I initially wanted to add more keywords ( In other words, let do it separately. |
I will try to look at these cases again. I share your annoyance with such cases, but on the other hand, I'm even more bothered by the lack of completions in expected places. Habits of using lua-language-server raise my expectations here too. |
At the moment I reproduced only the second case (in real use) - the first does not work after a few guesses. |
Comparing node string to `{` could worked because of parsing truncated document. Note that in the `method empty body keyword` data set CompoundStatementNode is `{}`.
to the place where it's needed.
phpactor/lib/Completion/Bridge/TolerantParser/CompletionContext.php Lines 208 to 210 in b890cfb
I noticed that commenting the above condition does not affect any test result. Where it could be needed? |
Now I think we need a separate method in |
return
and yield
Now it seems to be ready to review again. Some keywords like
|
I tried to set better priority for keywords: |
Experience with this PR shows that there can still exist lots of cases to consider to be statement context or not. Since implementing the new method in IMHO we could already merge this PR as is and possibly support new cases in the future. Before possible merge please report any annoying cases that I haven't found yet. |
No description provided.