Sublime Forum

How would I make my syntax color words than end with :

#1

I’m trying to make text highlighting for a language, and this language uses jump labels that end with :

I want the jump labels to be colored, but i can’t seem to find a way to color words than end with a character

0 Likes

#2

Most lables would start at a line followed by arbritary amount of whitespace.

A common pattern to match them is:

  label:
    - match: ^\s*([[:alpha:]][[:alnum:]_]*)(:)(?!:)
      captures:
        1: entity.name.label.my-syntax
        2: punctuation.separator.my-syntax
0 Likes