Skip to content

Better delimiter highlighting #2776

@tinyCatzilla

Description

@tinyCatzilla

As of right now, texMathDelim has some strange properties that I can't seem to wrangle.

  • within any texMathZone, inequalities are recognized as delimiters and not math operators.
  • For commands that are seen "under-the-hood" without delimiters, the delimiters and arguments are not recognized. For example, using \frac{1}{2} instead of the shortcut \frac12 will color the delimiters and numbers as part of the command. This sharply contrasts a similar fraction without a shortcut, like \frac{12}{2}.
  • Paired delimiters are recognized, such as \lvert and \rvert. The unpaired delimiter '|' is also recognized. But the synonymous command for the unpaired delimiter \vert is only seen as a command.

Below is a screenshot demonstrating these properties, where texMathDelim is pink, texDelim is dark blue, and texCmd and texCmdEnv are yellow.

SCR-20230823-ngrr

In regards to inequalities being delimiters, this is something particularly strange to me. I haven't heard of <> being delimiters in LaTeX, but I could just be uninformed. Also, If any of these are fixable or problems on my end, I would appreciate support getting it working :).

Edit: fuck, sorry about closing and reopening. was trying to edit to show this other strange thing i realized with regards to math operators not being recognized when superscripted.
SCR-20230823-nlqm

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions