aboutsummaryrefslogtreecommitdiff
path: root/queries/gsp
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2024-09-14 22:22:41 +0200
committerThomas Voss <mail@thomasvoss.com> 2024-09-14 22:22:41 +0200
commitbe988fbc200620bfff8657b7baf868234e899e13 (patch)
tree9089b4d1fd6aaaae08a69ac898dc6199bf164c87 /queries/gsp
parent642d5264e0d7b3d3870d13c2cc4a04987ee65ab6 (diff)
Lots of changes once again!
Diffstat (limited to 'queries/gsp')
-rw-r--r--queries/gsp/folds.scm3
-rw-r--r--queries/gsp/highlights.scm13
-rw-r--r--queries/gsp/textobjects.scm3
3 files changed, 10 insertions, 9 deletions
diff --git a/queries/gsp/folds.scm b/queries/gsp/folds.scm
index e15d359..c70d5dc 100644
--- a/queries/gsp/folds.scm
+++ b/queries/gsp/folds.scm
@@ -1,4 +1,5 @@
[
+ (comment)
(node)
- (attribute_list)
+ (attr_list)
] @fold
diff --git a/queries/gsp/highlights.scm b/queries/gsp/highlights.scm
index 92e61f6..bc81edb 100644
--- a/queries/gsp/highlights.scm
+++ b/queries/gsp/highlights.scm
@@ -1,12 +1,9 @@
-[">" "-" "=" "@"] @operator
+["-" "=" "@"] @operator
["{" "}"] @tag.delimiter
-(node_name) @tag
-[
- (attribute_name)
- (class_shorthand)
- (id_shorthand)
-] @tag.attribute
-(attribute_value) @string
+(node name: (ident) @tag)
+[(id_attr) (class_attr)] @tag.attribute
+(attr name: (ident) @tag.attribute)
+(string) @string
(comment) @comment
([_] @comment
(#has-ancestor? @comment comment))
diff --git a/queries/gsp/textobjects.scm b/queries/gsp/textobjects.scm
index 53db443..4f735ce 100644
--- a/queries/gsp/textobjects.scm
+++ b/queries/gsp/textobjects.scm
@@ -1,3 +1,6 @@
(node) @node.outer
(node_body) @node.inner
(text) @text.outer
+(comment) @comment.outer
+(comment (_+) @comment.inner)
+[(id_attr) (class_attr) (attr)] @attribute.outer