aboutsummaryrefslogtreecommitdiffstats
path: root/queries
diff options
context:
space:
mode:
authorSantos Gallegos <stsewd@protonmail.com>2021-12-22 13:26:55 -0500
committerStephan Seitz <stephan.seitz@fau.de>2021-12-22 21:17:28 +0100
commit56634f49ab3d8122153c8c5582c581fb6a6af075 (patch)
treea3a131d8e96a5f219193d1e728d2a7ce0ab991aa /queries
parentMarkdown: update queries (diff)
downloadnvim-treesitter-56634f49ab3d8122153c8c5582c581fb6a6af075.tar
nvim-treesitter-56634f49ab3d8122153c8c5582c581fb6a6af075.tar.gz
nvim-treesitter-56634f49ab3d8122153c8c5582c581fb6a6af075.tar.bz2
nvim-treesitter-56634f49ab3d8122153c8c5582c581fb6a6af075.tar.lz
nvim-treesitter-56634f49ab3d8122153c8c5582c581fb6a6af075.tar.xz
nvim-treesitter-56634f49ab3d8122153c8c5582c581fb6a6af075.tar.zst
nvim-treesitter-56634f49ab3d8122153c8c5582c581fb6a6af075.zip
Update queries
- Don't use the old form for predicates - Update some invalid queries
Diffstat (limited to 'queries')
-rw-r--r--queries/java/locals.scm5
-rw-r--r--queries/julia/highlights.scm12
-rw-r--r--queries/python/highlights.scm2
-rw-r--r--queries/ruby/locals.scm5
-rw-r--r--queries/sparql/locals.scm6
-rw-r--r--queries/supercollider/locals.scm6
6 files changed, 18 insertions, 18 deletions
diff --git a/queries/java/locals.scm b/queries/java/locals.scm
index 45aec390a..a7a624289 100644
--- a/queries/java/locals.scm
+++ b/queries/java/locals.scm
@@ -66,7 +66,7 @@
((scoped_identifier
(identifier) @definition.import)
- (has-ancestor? @definition.import import_declaration))
+ (#has-ancestor? @definition.import import_declaration))
(field_declaration
declarator: (variable_declarator
@@ -74,5 +74,4 @@
; REFERENCES
(identifier) @reference
-((type_identifier) @reference
- (set! reference.kind "type"))
+(type_identifier) @reference
diff --git a/queries/julia/highlights.scm b/queries/julia/highlights.scm
index 851298439..c1295622a 100644
--- a/queries/julia/highlights.scm
+++ b/queries/julia/highlights.scm
@@ -3,7 +3,7 @@
;((identifier) @type ; exception: mark `A_foo` sort of identifiers as variables
;(match? @type "^[A-Z][^_]"))
((identifier) @constant
- (match? @constant "^[A-Z][A-Z_]{2}[A-Z_]*$"))
+ (#match? @constant "^[A-Z][A-Z_]{2}[A-Z_]*$"))
[
(triple_string)
@@ -89,11 +89,11 @@
(number) @number
(range_expression
(identifier) @number
- (eq? @number "end"))
+ (#eq? @number "end"))
(range_expression
(_
(identifier) @number
- (eq? @number "end")))
+ (#eq? @number "end")))
(coefficient_expression
(number)
(identifier) @constant.builtin)
@@ -173,9 +173,9 @@
((identifier) @include (#eq? @include "baremodule"))
-(((identifier) @constant.builtin) (match? @constant.builtin "^(nothing|Inf|NaN)$"))
-(((identifier) @boolean) (eq? @boolean "true"))
-(((identifier) @boolean) (eq? @boolean "false"))
+(((identifier) @constant.builtin) (#match? @constant.builtin "^(nothing|Inf|NaN)$"))
+(((identifier) @boolean) (#eq? @boolean "true"))
+(((identifier) @boolean) (#eq? @boolean "false"))
["::" ":" "." "," "..." "!"] @punctuation.delimiter
["[" "]" "(" ")" "{" "}"] @punctuation.bracket
diff --git a/queries/python/highlights.scm b/queries/python/highlights.scm
index 533233e48..0813c960b 100644
--- a/queries/python/highlights.scm
+++ b/queries/python/highlights.scm
@@ -75,7 +75,7 @@
((call
function: (identifier) @function.builtin)
- (any-of? @function.builtin
+ (#any-of? @function.builtin
"abs" "all" "any" "ascii" "bin" "bool" "breakpoint" "bytearray" "bytes" "callable" "chr" "classmethod"
"compile" "complex" "delattr" "dict" "dir" "divmod" "enumerate" "eval" "exec" "filter" "float" "format"
"frozenset" "getattr" "globals" "hasattr" "hash" "help" "hex" "id" "input" "int" "isinstance" "issubclass"
diff --git a/queries/ruby/locals.scm b/queries/ruby/locals.scm
index fe85bf209..dacc46994 100644
--- a/queries/ruby/locals.scm
+++ b/queries/ruby/locals.scm
@@ -21,8 +21,7 @@
; SOFTWARE.
;;; DECLARATIONS AND SCOPES
-((method) @scope
- (set! scope-inherits false))
+(method) @scope
(class) @scope
[
@@ -49,7 +48,7 @@
(block_parameter name: (identifier) @definition.var)
(keyword_parameter name: (identifier) @definition.var)
-(assignment left: (_lhs) @definition.var)
+(assignment left: (_) @definition.var)
(left_assignment_list (identifier) @definition.var)
(rest_assignment (identifier) @definition.var)
diff --git a/queries/sparql/locals.scm b/queries/sparql/locals.scm
index 3a3d3187f..107aaeb75 100644
--- a/queries/sparql/locals.scm
+++ b/queries/sparql/locals.scm
@@ -1,6 +1,8 @@
(group_graph_pattern (triples_block) @scope)
-(sub_select (select_clause (var) @definition.var)(set! "definition.var.scope" "parent"))
-(select_query (select_clause (var) @definition.var)(set! "definition.var.scope" "parent"))
+((sub_select (select_clause (var) @definition.var))
+ (#set! "definition.var.scope" "parent"))
+((select_query (select_clause (var) @definition.var))
+ (#set! "definition.var.scope" "parent"))
(var) @reference
diff --git a/queries/supercollider/locals.scm b/queries/supercollider/locals.scm
index 25cd19b79..f2238b478 100644
--- a/queries/supercollider/locals.scm
+++ b/queries/supercollider/locals.scm
@@ -9,7 +9,7 @@
; Definitions
(argument
name: (identifier) @definition.parameter
- (set! "definition.var.scope" "local")
+ (#set! "definition.var.scope" "local")
)
(variable_definition
@@ -18,10 +18,10 @@
(variable_definition
name: (variable (environment_var (identifier) @definition.var))
- (set! "definition.var.scope" "global"))
+ (#set! "definition.var.scope" "global"))
(function_definition name: (variable) @definition.var
- (set! "definition.var.scope" "parent")
+ (#set! "definition.var.scope" "parent")
)
(identifier) @reference