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

Math delimiters \(....\) are not highlighted as pairs #42

Closed
jlelong opened this issue Jan 30, 2023 · 3 comments
Closed

Math delimiters \(....\) are not highlighted as pairs #42

jlelong opened this issue Jan 30, 2023 · 3 comments
Assignees

Comments

@jlelong
Copy link
Owner

jlelong commented Jan 30, 2023

Originally posted in James-Yu/LaTeX-Workshop#3677

Inline maths delimiters \(...\) are not highlighted as pairs.

@jlelong jlelong self-assigned this Feb 1, 2023
@jlelong
Copy link
Owner Author

jlelong commented Feb 1, 2023

@harrysw1729 @James-Yu

Even if it looked a good idea at first sight, I think this is actually a bad idea.

Once delimiters are declared as a pair, we loose complete control of the highlighting, which is automatically handled by VS Code, when editor.bracketPairColorization.enabled is set.

I made an attempt in https://github.com/jlelong/vscode-latex-basics/tree/42_escaped_parens_pair

Capture d’écran 2023-02-01 à 08 28 01

Note the following inconsistencies

  • The pair $ ... $ has the same scope as \(...\)but it is highlighted differently because $...$ is not declared as a bracket pair.
  • The color of \(...\) depends on its nesting level.

I think the cons are really out weighting the pros. So, I am closing this issue.

@jlelong jlelong closed this as completed Feb 1, 2023
@RedCMD
Copy link

RedCMD commented Feb 3, 2023

vscode is about to add the option to disable colouring on bracket pairs
microsoft/vscode#170497

@jlelong
Copy link
Owner Author

jlelong commented Feb 3, 2023

@RedCMD Thanks for the link. I will keep an eye on it to see how to best modify our language configuration files.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 6, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants