-
Notifications
You must be signed in to change notification settings - Fork 769
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
[READY] Relax semantic trigger matching to match between column start and current cursor column #319
Conversation
Match triggers until user's caret column solely. Trying to match triggers with characters after user's caret column doesn't seem to have any utility.
Generally looks good. Some people thoughts:
Reviewed 3 of 3 files at r1. ycmd/completers/completer_utils.py, line 87 [r1] (raw file): Comments from the review on Reviewable.io |
Lookahead regex hack will work again (it was broken by PR #292) but will not be needed anymore. I can't think of any other hack.
Probably. We could use our dummy completer for these tests.
This PR only affects the value returned by Review status: all files reviewed at latest revision, 1 unresolved discussion. ycmd/completers/completer_utils.py, line 87 [r1] (raw file): Comments from the review on Reviewable.io |
OK with that minor comment this . Great work. I wonder if there is anywhere that this behaviour is currently documented, and if we need to update that? The previous behaviour was fairly subtle, and now it is subtly different. Not really sure. Maybe an update to YCM's README for the option, or the comments around the default trigger map. Review status: all files reviewed at latest revision, 1 unresolved discussion. Comments from the review on Reviewable.io |
I'm a little puzzled by some changes (I have to admit that I don't remember how this whole piece of code works):
Review status: all files reviewed at latest revision, 1 unresolved discussion. Comments from the review on Reviewable.io |
Once remaining comments are added, it's for me too. Review status: all files reviewed at latest revision, 1 unresolved discussion. Comments from the review on Reviewable.io |
Currently, semantic trigger must match at the column start of the identifier word under the cursor. This is problematic when the trigger ends with identifier characters because these characters will always be after the column start. This is fixed by searching between the column start and the current cursor column.
a254497
to
0af311a
Compare
I added the comment (hope it is understandable) and an integration test.
Current behavior is to check at foo.bar_qux
^ ^
| column_num
start_column If our trigger is Review status: 2 of 4 files reviewed at latest revision, 1 unresolved discussion. ycmd/completers/completer_utils.py, line 87 [r1] (raw file): Comments from the review on Reviewable.io |
@homu +r. Good explanation, I'm not sure the act of triggering needed to be so tricky! Review status: 2 of 4 files reviewed at latest revision, 1 unresolved discussion. Comments from the review on Reviewable.io |
@homu r+ Review status: 2 of 4 files reviewed at latest revision, 1 unresolved discussion. Comments from the review on Reviewable.io |
📌 Commit 0af311a has been approved by |
[READY] Relax semantic trigger matching to match between column start and current cursor column This PR fixes issues ycm-core/YouCompleteMe#1602 and ycm-core/YouCompleteMe#1930. I updated the tests and added some cases. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/valloric/ycmd/319) <!-- Reviewable:end -->
☀️ Test successful - status |
This PR fixes issues ycm-core/YouCompleteMe#1602 and ycm-core/YouCompleteMe#1930.
I updated the tests and added some cases.