Skip to content

Commit 9e6416d

Browse files
committed
python: Highlight decorators with arguments.
1 parent 24edcaf commit 9e6416d

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

crates/languages/src/python/highlights.scm

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,18 @@
2828

2929
; Function calls
3030

31-
(decorator
32-
"@" @punctuation.special
33-
(identifier) @function.decorator)
34-
3531
(call
3632
function: (attribute attribute: (identifier) @function.method.call))
3733
(call
3834
function: (identifier) @function.call)
3935

36+
(decorator
37+
"@" @punctuation.special
38+
(identifier) @function.decorator)
39+
(decorator
40+
"@" @punctuation.special
41+
(call function: (identifier) @function.decorator.call))
42+
4043
; Function and class definitions
4144

4245
(function_definition

0 commit comments

Comments
 (0)