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

Improve regex highlighting in Python #678

Closed
monosans opened this issue Jan 17, 2022 · 11 comments
Closed

Improve regex highlighting in Python #678

monosans opened this issue Jan 17, 2022 · 11 comments
Labels
feature request WIP Work In Process

Comments

@monosans
Copy link

monosans commented Jan 17, 2022

Describe what you want

The regex highlighting in Python in Dark+ is fancier than in One Dark Pro.

Additional context

As you can see in the screenshots, Dark+ uses 3 colors for regex highlighting, while One Dark Pro only uses 2.

Dark+
One Dark Pro

Code from screenshots for reproducing:

import re
tag_pattern = re.compile(r"\[(id\d+?)\|.+?\]")
@Binaryify Binaryify added the WIP Work In Process label Feb 8, 2022
Binaryify added a commit that referenced this issue Feb 8, 2022
@Binaryify
Copy link
Owner

plz check 3.13.19~

@monosans
Copy link
Author

monosans commented Feb 8, 2022

plz check 3.13.19~

Looks good. Thank you.

@monosans monosans closed this as completed Feb 8, 2022
@tomaciazek
Copy link

Hey, it looks like the related commit has introduced configuration that overrides pre-existing block:

{
  name: 'Escape Characters',
  scope: 'constant.character.escape',
  settings: {
    foreground: 'fountainBlue',
  },
},

This changes highlighting for tokens outside of regular expressions. Was that intended?

@Binaryify
Copy link
Owner

@tomaciazek no, just want improve regex highlighting, could you provide some code to show what highlight had been affected?

@tomaciazek
Copy link

Sure.
In Python:
image

In JSON:
image

Binaryify added a commit that referenced this issue Feb 19, 2022
@Binaryify
Copy link
Owner

@tomaciazek plz check v3.13.20~

@tomaciazek
Copy link

Now there's good old fountain-blue on escape characters :) Thanks!

@prot23
Copy link

prot23 commented Mar 27, 2022

Describe what you want

The regex highlighting in Python in Dark+ is fancier than in One Dark Pro.

Additional context

As you can see in the screenshots, Dark+ uses 3 colors for regex highlighting, while One Dark Pro only uses 2.

Dark+ One Dark Pro

Code from screenshots for reproducing:

import re
tag_pattern = re.compile(r"\[(id\d+?)\|.+?\]")

#596

@prot23
Copy link

prot23 commented Mar 27, 2022

import re
tag_pattern = re.compile(r"[(id\d+?)|.+?]")

@prot23
Copy link

prot23 commented Mar 27, 2022

import re tag_pattern = re.compile(r"\[(id\d+?)\|.+?\]")

1 similar comment
@prot23
Copy link

prot23 commented Mar 27, 2022

import re tag_pattern = re.compile(r"\[(id\d+?)\|.+?\]")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request WIP Work In Process
Projects
None yet
Development

No branches or pull requests

4 participants