aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Chalkin <L2jLiga@gmail.com>2024-08-01 08:40:44 +0200
committerGitHub <noreply@github.com>2024-08-01 08:40:44 +0200
commitfcf79acfd17e7a8da3c96f29be7022bba5607201 (patch)
tree8222a1f281cdc82e9810c89d425768887923c313
parentfix(format): field_def inside grouping (diff)
downloadnvim-treesitter-fcf79acfd17e7a8da3c96f29be7022bba5607201.tar
nvim-treesitter-fcf79acfd17e7a8da3c96f29be7022bba5607201.tar.gz
nvim-treesitter-fcf79acfd17e7a8da3c96f29be7022bba5607201.tar.bz2
nvim-treesitter-fcf79acfd17e7a8da3c96f29be7022bba5607201.tar.lz
nvim-treesitter-fcf79acfd17e7a8da3c96f29be7022bba5607201.tar.xz
nvim-treesitter-fcf79acfd17e7a8da3c96f29be7022bba5607201.tar.zst
nvim-treesitter-fcf79acfd17e7a8da3c96f29be7022bba5607201.zip
feat(powershell): added data section name highlights
-rw-r--r--queries/powershell/highlights.scm10
-rw-r--r--queries/powershell/locals.scm4
2 files changed, 11 insertions, 3 deletions
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