-
Notifications
You must be signed in to change notification settings - Fork 60
Fix autocompletion in template expressions. #483
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
Conversation
posCursor:[402:22] posNoWhite:[402:20] Found expr:[401:16->402:27] | ||
Pexp_apply ...__ghost__[0:-1->0:-1] (...[400:14->401:16], ...[401:16->402:24]) | ||
posCursor:[402:22] posNoWhite:[402:20] Found expr:[401:16->402:24] | ||
Completable: Cnone |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This does not -- it never finds that it's possible to complete here.
Need to see what code the template parser generates. It's a big string append, and also need to check that the locations are correct or this will never be found.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While before there was an ident inside ghosts, it does not seem the case here.
Either there isn't one based on location, or there is an is not found.
So far this works only if the cursor is *after* the first character. This will later need to be moved to the syntax repo and synched back.
So this is progress so far. |
The location is now more accurate. |
posCursor:[402:24] posNoWhite:[402:23] Found expr:[400:14->402:31] | ||
Pexp_apply ...__ghost__[0:-1->0:-1] (...[401:16->402:27], ...[402:27->402:31]) | ||
posCursor:[402:24] posNoWhite:[402:23] Found expr:[401:16->402:27] | ||
Pexp_apply ...__ghost__[0:-1->0:-1] (...[401:16->402:27], ...[402:24->402:27]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mmm looks like this is a ++ b
and the locations of the two overlap. Something does not look right in the locations provided by the parser.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because we go on exploring the first expression while we should explore the second one.
This now works as expected. Need to move the changes to the syntax repo. |
The issue turns out to be the location information given by the parser.
This was fixed in the syntax repo and synched here.
See #480