diff --git a/crates/grammars/src/python/highlights.scm b/crates/grammars/src/python/highlights.scm index 7641cef117..cf2fb39762 100644 --- a/crates/grammars/src/python/highlights.scm +++ b/crates/grammars/src/python/highlights.scm @@ -46,18 +46,17 @@ function: (identifier) @function.call) (decorator - "@" @punctuation.special) - -(decorator - "@" @punctuation.special + "@" @function.decorator [ (identifier) @function.decorator (attribute + object: (identifier) @function.decorator attribute: (identifier) @function.decorator) (call function: (identifier) @function.decorator.call) (call (attribute + object: (identifier) @function.decorator.call attribute: (identifier) @function.decorator.call)) ]) @@ -257,7 +256,6 @@ "&" "%" "%=" - "@" "^" "+" "->" @@ -282,6 +280,9 @@ "|=" ] @operator +(binary_operator + operator: "@" @operator) + [ "and" "in" @@ -335,8 +336,9 @@ ] @keyword.definition (decorator - (identifier) @attribute.builtin - (#any-of? @attribute.builtin "classmethod" "staticmethod" "property")) + "@" @attribute.builtin + (identifier) @attribute.builtin @_decorator + (#any-of? @_decorator "classmethod" "staticmethod" "property")) (attribute attribute: (identifier) @attribute.special