Skip to content

Commit

Permalink
python: Highlight decorators with arguments.
Browse files Browse the repository at this point in the history
  • Loading branch information
JaagupAverin committed Dec 5, 2024
1 parent 24edcaf commit 9e6416d
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions crates/languages/src/python/highlights.scm
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,18 @@

; Function calls

(decorator
"@" @punctuation.special
(identifier) @function.decorator)

(call
function: (attribute attribute: (identifier) @function.method.call))
(call
function: (identifier) @function.call)

(decorator
"@" @punctuation.special
(identifier) @function.decorator)
(decorator
"@" @punctuation.special
(call function: (identifier) @function.decorator.call))

; Function and class definitions

(function_definition
Expand Down

0 comments on commit 9e6416d

Please sign in to comment.