Skip to content
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

Complete left with right always. #3538

Merged
merged 3 commits into from
May 6, 2024
Merged

Conversation

jojo2357
Copy link
Contributor

@jojo2357 jojo2357 commented May 3, 2024

Fix #3486

How to test this pull request

$\lflo<caret> $

then hit tab for lfloor

Works on its own, still trying to figure out how to get the case of

$\lfloo<caret>$

and typing r to complete

@jojo2357
Copy link
Contributor Author

jojo2357 commented May 3, 2024

So to tackle #3493 need to edit LatexTypedHandler. But how do we check for non-matched things like \lfloor? because typing the r would probably need to trigger it?

Im not sure how we are going to handle this and prevent a bunch of false positives

Copy link
Collaborator

@PHPirates PHPirates left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, agree with this change! I just added a test, which passes.

As to #3493, maybe it would be nicest to work with LatexPairedBraceMatcher, but that might require some changes in the lexer (as the \left. things would need to be a separate tokentype I think). Doing this manually with a typed handler would be difficult.

@PHPirates PHPirates added this to the Next milestone May 4, 2024
@jojo2357
Copy link
Contributor Author

jojo2357 commented May 5, 2024

I think a lexer improvement would be in order to make all the paired commands easily matchable?

I thinks its fine to merge this w/o fixing #3493 I also updated its title to be more technically on the nose

@PHPirates PHPirates merged commit 00b0ef5 into Hannah-Sten:master May 6, 2024
8 checks passed
@PHPirates
Copy link
Collaborator

Yes, I'm just not sure if editing the lexer would break something else

@jojo2357 jojo2357 deleted the left-right branch May 8, 2024 21:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Complete \lfloor with \rfloor
2 participants