KeywordCompletor: complete statement keywords#2622
KeywordCompletor: complete statement keywords#2622przepompownia wants to merge 1 commit intophpactor:masterfrom
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. |
|
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. |
|
Yes, I caught it too and still have no time to focus on it. |
|
Again, I am nervous about that PR - it adds lots of conditionals to make up for the fact that the parser breaks in strange and unpredictable ways. It would need constant maintainence and will likely never behave properly. The last one I merged introduced false positives which I'd like to revert ( I'd rather have no suggestions than wrong ones, for me at least the value is in completing class and function names, and not so much in keywords. |
|
Feel free to close this PR if you think so (and no one lets us know they need it). I have some use for it and I want to continue this experiment even on a branch detached from any PR. |
e5dff8e to
ff3ba8d
Compare
bd2f723 to
16d5715
Compare
16d5715 to
08abd82
Compare
|
Test failure: #3007 |
08abd82 to
5f1cea0
Compare















No description provided.