on master help sign in
Update TSQ queries (#2960)
aacd0c8Michael Davis
languages.toml+1−1
@@ -707,7 +707,7 @@ indent = { tab-width = 2, unit = " " }
707
707
708[[grammar]]
708[[grammar]]
709name = "tsq"
709name = "tsq"
710−source = { git = "https://github.com/the-mikedavis/tree-sitter-tsq", rev = "ea68fc2b571ca1c8f70936855130c380f518ff35" }
710+source = { git = "https://github.com/the-mikedavis/tree-sitter-tsq", rev = "48b5e9f82ae0a4727201626f33a17f69f8e0ff86" }
711
711
712[[language]]
712[[language]]
713name = "cmake"
713name = "cmake"
runtime/queries/tsq/highlights.scm+6−3
@@ -6,7 +6,7 @@
6
6
7; highlight inheritance comments
7; highlight inheritance comments
8((query . (comment) @keyword.directive)
8((query . (comment) @keyword.directive)
9− (#match? @keyword.directive "^;\ +inherits *:"))
9+ (#match? @keyword.directive "^; +inherits *:"))
10
10
11[
11[
12 "("
12 "("
@@ -40,8 +40,11 @@
40
40
41(capture) @label
41(capture) @label
42
42
43−(predicate_name) @function
43+((predicate_name) @function
44+ (#match? @function "^#(eq\\?|match\\?|is\\?|is-not\\?|not-same-line\\?|not-kind-eq\\?|set!|select-adjacent!|strip!)$"))
45+(predicate_name) @error
44
46
45(escape_sequence) @constant.character.escape
47(escape_sequence) @constant.character.escape
46
48
47−(node_name) @variable
49+(node_name) @tag
50+(variable) @variable
runtime/queries/tsq/injections.scm+6
@@ -1,2 +1,8 @@
1((comment) @injection.content
1((comment) @injection.content
2 (#set! injection.language "comment"))
2 (#set! injection.language "comment"))
3+
4+((predicate
5+ (predicate_name) @_predicate
6+ (string) @injection.content)
7+ (#eq? @_predicate "#match?")
8+ (#set! injection.language "regex"))