From 9e6416dc0083c5b6f9c4592201da29ef11b5904b Mon Sep 17 00:00:00 2001 From: Jaagup Averin Date: Thu, 5 Dec 2024 18:20:37 +0200 Subject: [PATCH] python: Highlight decorators with arguments. --- crates/languages/src/python/highlights.scm | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/crates/languages/src/python/highlights.scm b/crates/languages/src/python/highlights.scm index b3ead95bd9dc9b..3a9885271812d7 100644 --- a/crates/languages/src/python/highlights.scm +++ b/crates/languages/src/python/highlights.scm @@ -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