From fcf79acfd17e7a8da3c96f29be7022bba5607201 Mon Sep 17 00:00:00 2001 From: Andrey Chalkin Date: Thu, 1 Aug 2024 08:40:44 +0200 Subject: feat(powershell): added data section name highlights --- queries/powershell/highlights.scm | 10 +++++++--- queries/powershell/locals.scm | 4 ++++ 2 files changed, 11 insertions(+), 3 deletions(-) (limited to 'queries/powershell') diff --git a/queries/powershell/highlights.scm b/queries/powershell/highlights.scm index 62fd7f5eb..3885ba833 100644 --- a/queries/powershell/highlights.scm +++ b/queries/powershell/highlights.scm @@ -67,7 +67,10 @@ "enum" ] @keyword.type -(class_attribute) @keyword.modifier +[ + "data" + (class_attribute) +] @keyword.modifier [ "throw" @@ -87,8 +90,6 @@ "begin" "process" "end" - ; TODO: not supported by parser yet, can be used to declare constants - "data" ] @keyword ; Operators @@ -143,6 +144,9 @@ ((variable) @variable.builtin (#lua-match? @variable.builtin "^\$env:")) +(data_name + (simple_name) @constant) + (comment) @comment @spell ((program diff --git a/queries/powershell/locals.scm b/queries/powershell/locals.scm index 3a8158d3f..e98410992 100644 --- a/queries/powershell/locals.scm +++ b/queries/powershell/locals.scm @@ -68,6 +68,10 @@ (unary_expression (variable) @local.definition.var)))))))))))))) +; data sections +(data_name + (simple_name) @local.definition.var) + ; References ;----------- (variable) @local.reference -- cgit v1.2.3-70-g09d2