microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
162.38k stars 28.61k forks source link

Disable font ligatures in Regex mode #187023

Open Viicos opened 1 year ago

Viicos commented 1 year ago

I'm using a font with ligatures enabled, and writing regular expressions can be hard when using specific character combinations. For instance, the following:

a = r"(.|-|_)"
b = r"(\[|\])"

Renders as:

image

That might not be specific to Python and the issue probably comes up with other languages, but using the r mode is specific to the language, and we could probably switch ligatures off in this mode to improve visibility?

karthiknadig commented 1 year ago

Python extension does not control this behavior. Transferring to VS Code.

rzhao271 commented 1 year ago

Is the ask to disable font ligatures for sections identified as regex strings?

karthiknadig commented 1 year ago

Is the ask to disable font ligatures for sections identified as regex strings?

@rzhao271 That is correct.

VSCodeTriageBot commented 1 year ago

This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.

Happy Coding!

Viicos commented 1 year ago

@rzhao271 this was originally an issue on the python extension, but indeed this can be expended to other languages, e.g. JS: /(.|-|_)/.

Other languages such as Java doesn't have any specific syntax (such as r""... or /.../), so I don't think they could be supported