diff --git a/LESS.sublime-syntax b/LESS.sublime-syntax index d0d4118..be7503c 100644 --- a/LESS.sublime-syntax +++ b/LESS.sublime-syntax @@ -211,8 +211,10 @@ contexts: - include: less-operators - include: commas - include: terminator - - match: '[\.#](?![0-9])[a-zA-Z0-9_-]+(?=\()' - scope: entity.other.attribute-name.class.css entity.other.less.mixin + - match: '([\.#])(?![0-9])[a-zA-Z0-9_-]+(?=\()' + scope: meta.selector.css entity.other.attribute-name.class.css entity.other.less.mixin + captures: + 1: punctuation.definition.entity.css less-operators: - match: /|$|%|\*|\-\-|\-|\+\+|\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|%=|\+=|\-=|&=|\bnot\b|\bor\b|\band\b|\bwhen\b|\bfrom\b|\bto\b diff --git a/syntax_test_less.less b/syntax_test_less.less index da9c738..f24d935 100755 --- a/syntax_test_less.less +++ b/syntax_test_less.less @@ -162,6 +162,12 @@ html::before { color: @link-color; text-decoration: none; &:hover { + .mixin { /* */ } +/* ^ punctuation.definition.entity.css */ +/* ^^^^^^ meta.selector.css */ + .mixin() { /* */ } +/* ^ punctuation.definition.entity.css */ +/* ^^^^^^ meta.selector.css */ .message-mixin(success; var(--green); var(--green-dark)); /* ^^^ support.function.var.css */ /* ^^ punctuation.definition.custom-property.css*/ @@ -188,6 +194,7 @@ html::before { #namespace when (@mode = huge) { /* ^ meta.function.parameters.less keyword.operator.less */ + .mixin { /* */ } .mixin() { /* */ } } .mixin(@a) when not (isnumber(@a)) and (@a > 0) ... }