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

Highlight match feature #169

Merged
merged 6 commits into from
Dec 11, 2023
Merged

Conversation

ArtemKar123
Copy link
Collaborator

@ArtemKar123 ArtemKar123 commented Dec 6, 2023

Highlight match feature

  • Match highlighting
  • Compatibility with line highlighting
  • Nested matches
  • Overlapping matches
  • Multiline matches

How it looks

image image

How it works

When creating a pattern, capture groups should be used. All the capture groups will be highlighted.

  1. Use every pattern and find matches in the token
  2. Add the line background for line highlighting compatibility
  3. Remove all the overlaps, so that every character is present only once and color is displayed correctly even in the case of overlaps.

What else

  • fixed linesSubSequence out of bounds bug
  • removed unnecessary token.isSeparator checks

@ArtemKar123 ArtemKar123 marked this pull request as draft December 6, 2023 09:36
@ArtemKar123 ArtemKar123 marked this pull request as ready for review December 9, 2023 12:00
@mfilippov mfilippov merged commit 9a28125 into JetBrains:master Dec 11, 2023
1 check passed
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.

2 participants