aboutsummaryrefslogtreecommitdiffstats
path: root/queries
diff options
context:
space:
mode:
authorSteven Sojka <steelsojka@gmail.com>2020-08-16 11:24:10 -0500
committerKiyan Yazdani <yazdani.kiyan@protonmail.com>2020-08-16 18:31:56 +0200
commitce43dbf54cdc017e6885381f38ea056f78c4e55b (patch)
tree27a4e0475002d2e3845e942cab8d57aeea679bff /queries
parentMerge pull request #296 from steelsojka/feat-is-predicate (diff)
downloadnvim-treesitter-ce43dbf54cdc017e6885381f38ea056f78c4e55b.tar
nvim-treesitter-ce43dbf54cdc017e6885381f38ea056f78c4e55b.tar.gz
nvim-treesitter-ce43dbf54cdc017e6885381f38ea056f78c4e55b.tar.bz2
nvim-treesitter-ce43dbf54cdc017e6885381f38ea056f78c4e55b.tar.lz
nvim-treesitter-ce43dbf54cdc017e6885381f38ea056f78c4e55b.tar.xz
nvim-treesitter-ce43dbf54cdc017e6885381f38ea056f78c4e55b.tar.zst
nvim-treesitter-ce43dbf54cdc017e6885381f38ea056f78c4e55b.zip
fix(queries): use vim-match for non lua regexes
Diffstat (limited to 'queries')
-rw-r--r--queries/bash/highlights.scm18
-rw-r--r--queries/css/highlights.scm2
-rw-r--r--queries/dart/highlights.scm2
-rw-r--r--queries/go/highlights.scm6
-rw-r--r--queries/java/highlights.scm2
-rw-r--r--queries/javascript/highlights.scm6
-rw-r--r--queries/php/highlights.scm2
-rw-r--r--queries/python/highlights.scm4
-rw-r--r--queries/rst/highlights.scm4
-rw-r--r--queries/ruby/highlights.scm10
-rw-r--r--queries/rust/highlights.scm2
11 files changed, 29 insertions, 29 deletions
diff --git a/queries/bash/highlights.scm b/queries/bash/highlights.scm
index c0ec8d698..80dbf45db 100644
--- a/queries/bash/highlights.scm
+++ b/queries/bash/highlights.scm
@@ -26,7 +26,7 @@
] @operator
[
- (string)
+ (string)
(raw_string)
(heredoc_body)
] @string
@@ -58,18 +58,18 @@
] @keyword
[
- (special_variable_name)
+ (special_variable_name)
("$" (special_variable_name))
] @constant
((word) @constant
- (#match? @constant "SIG(INT|TERM|QUIT|TIN|TOU|STP|HUP)"))
+ (#vim-match? @constant "SIG(INT|TERM|QUIT|TIN|TOU|STP|HUP)"))
((word) @boolean
- (#match? @boolean "true|false"))
+ (#vim-match? @boolean "true|false"))
((word) @number
- (#match? @number "^\d*$"))
+ (#vim-match? @number "^\d*$"))
(comment) @comment
(test_operator) @string.
@@ -83,11 +83,11 @@
(command_name (word)) @function
-(command
+(command
argument: [
(word) @parameter
((word) @number
- (#match? @number "^\d*$"))
+ (#vim-match? @number "^\d*$"))
(concatenation (word) @parameter)
])
@@ -98,12 +98,12 @@
("$" (variable_name)) @identifier
-(expansion
+(expansion
[ "${" "}" ] @punctuation.bracket)
(variable_name) @identifier
-(case_item
+(case_item
value: (word) @parameter)
(concatenation (word) @parameter)
diff --git a/queries/css/highlights.scm b/queries/css/highlights.scm
index 1b876c4b1..6748fc0fc 100644
--- a/queries/css/highlights.scm
+++ b/queries/css/highlights.scm
@@ -33,7 +33,7 @@
"|="
"~="
"$="
- "*="
+ "*="
"and"
"or"
"not"
diff --git a/queries/dart/highlights.scm b/queries/dart/highlights.scm
index 539121de3..1f20857c8 100644
--- a/queries/dart/highlights.scm
+++ b/queries/dart/highlights.scm
@@ -194,7 +194,7 @@
; when used as an identifier:
((identifier) @variable.builtin
- (#match? @variable.builtin "^(abstract|as|covariant|deferred|dynamic|export|external|factory|Function|get|implements|import|interface|library|operator|mixin|part|set|static|typedef)$"))
+ (#vim-match? @variable.builtin "^(abstract|as|covariant|deferred|dynamic|export|external|factory|Function|get|implements|import|interface|library|operator|mixin|part|set|static|typedef)$"))
["if" "else" "switch" "default"] @conditional
diff --git a/queries/go/highlights.scm b/queries/go/highlights.scm
index fb5df7f11..a8473f06a 100644
--- a/queries/go/highlights.scm
+++ b/queries/go/highlights.scm
@@ -1,4 +1,4 @@
-;; Forked from tree-sitter-go
+;; Forked from tree-sitter-go
;; Copyright (c) 2014 Max Brunsfeld (The MIT License)
;;
@@ -12,10 +12,10 @@
(variadic_parameter_declaration (identifier) @parameter)
((identifier) @constant
- (#eq? @constant "_"))
+ (#eq? @constant "_"))
((identifier) @constant
- (#match? @constant "^[A-Z][A-Z\\d_]+$"))
+ (#vim-match? @constant "^[A-Z][A-Z\\d_]+$"))
; Function calls
diff --git a/queries/java/highlights.scm b/queries/java/highlights.scm
index f3da9af31..7f3a7aa49 100644
--- a/queries/java/highlights.scm
+++ b/queries/java/highlights.scm
@@ -103,7 +103,7 @@
; Variables
((identifier) @constant
- (#match? @constant "^_*[A-Z][A-Z\d_]+"))
+ (#vim-match? @constant "^_*[A-Z][A-Z\d_]+"))
(this) @constant.builtin
diff --git a/queries/javascript/highlights.scm b/queries/javascript/highlights.scm
index 6cc7ab43d..e05cc4141 100644
--- a/queries/javascript/highlights.scm
+++ b/queries/javascript/highlights.scm
@@ -13,17 +13,17 @@
(identifier) @variable
((identifier) @constant
- (#match? @constant "^[A-Z_][A-Z\\d_]+$"))
+ (#vim-match? @constant "^[A-Z_][A-Z\\d_]+$"))
((shorthand_property_identifier) @constant
- (#match? @constant "^[A-Z_][A-Z\\d_]+$"))
+ (#vim-match? @constant "^[A-Z_][A-Z\\d_]+$"))
((identifier) @constructor
(#match? @constructor "^[A-Z]"))
((identifier) @variable.builtin
(#not-is? @variable.builtin import var parameter)
- (#match? @variable.builtin "^(arguments|module|console|window|document)$"))
+ (#vim-match? @variable.builtin "^(arguments|module|console|window|document)$"))
((identifier) @function.builtin
(#not-is? @function.builtin import var parameter)
diff --git a/queries/php/highlights.scm b/queries/php/highlights.scm
index a74c5b619..3ec2b5916 100644
--- a/queries/php/highlights.scm
+++ b/queries/php/highlights.scm
@@ -42,7 +42,7 @@
(relative_scope) @variable.builtin
((name) @constant
- (#match? @constant "^_?[A-Z][A-Z\d_]+$"))
+ (#vim-match? @constant "^_?[A-Z][A-Z\d_]+$"))
((name) @constructor
(#match? @constructor "^[A-Z]"))
diff --git a/queries/python/highlights.scm b/queries/python/highlights.scm
index e65a58aee..8bac99e50 100644
--- a/queries/python/highlights.scm
+++ b/queries/python/highlights.scm
@@ -43,7 +43,7 @@
((call
function: (identifier) @function.builtin)
- (match?
+ (vim-match?
@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|iter|len|list|locals|map|max|memoryview|min|next|object|oct|open|ord|pow|print|property|range|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|vars|zip|__import__)$"))
@@ -63,7 +63,7 @@
parameters: (parameters
(identifier) @self) )
(eq? @self "self")
- (match? @constructor "(__new__|__init__)"))
+ (vim-match? @constructor "(__new__|__init__)"))
(type (identifier) @type)
(type
diff --git a/queries/rst/highlights.scm b/queries/rst/highlights.scm
index 3f719d9f3..b5046d316 100644
--- a/queries/rst/highlights.scm
+++ b/queries/rst/highlights.scm
@@ -23,7 +23,7 @@
((directive
name: (type) @function.builtin)
- (#match?
+ (#vim-match?
@function.builtin
; https://docutils.sourceforge.io/docs/ref/rst/directives.html
"^(attention|caution|danger|error|hint|important|note|tip|warning|admonition)|(image|figure)|(topic|sidebar|line-block|parsed-literal|code|math|rubric|epigraph|highlights|pull-quote|compound|container)|(table|csv-table|list-table)|(contents|sectnum|section-numbering|header|footer)|(target-notes)|(meta)|(replace|unicode|date)|(raw|class|role|default-role|title|restructuredtext-test-directive)::$"))
@@ -73,7 +73,7 @@
(role) @function
((role) @function.builtin
- (#match?
+ (#vim-match?
@function.builtin
; https://docutils.sourceforge.io/docs/ref/rst/roles.html
"^:(emphasis|literal|code|math|pep-reference|PEP|rfc-reference|RFC|strong|subscript|sub|superscript|sup|title-reference|title|t|raw):$"))
diff --git a/queries/ruby/highlights.scm b/queries/ruby/highlights.scm
index d7d880043..fe79af423 100644
--- a/queries/ruby/highlights.scm
+++ b/queries/ruby/highlights.scm
@@ -38,7 +38,7 @@
((identifier) @keyword
- (#match? @keyword "^(private|protected|public)$"))
+ (#vim-match? @keyword "^(private|protected|public)$"))
; Function calls
@@ -85,14 +85,14 @@
; Identifiers
[
(class_variable)
- (instance_variable)
+ (instance_variable)
] @label
((identifier) @constant.builtin
- (#match? @constant.builtin "^__(FILE|LINE|ENCODING)__$"))
+ (#vim-match? @constant.builtin "^__(FILE|LINE|ENCODING)__$"))
((constant) @constant.macro
- (#match? @constant.macro "^[A-Z\\d_]+$"))
+ (#vim-match? @constant.macro "^[A-Z\\d_]+$"))
(constant) @constant
@@ -175,7 +175,7 @@
"{"
"}"
"%w("
- "%i("
+ "%i("
] @punctuation.bracket
(ERROR) @error
diff --git a/queries/rust/highlights.scm b/queries/rust/highlights.scm
index 9b873b2f6..1a3e53e80 100644
--- a/queries/rust/highlights.scm
+++ b/queries/rust/highlights.scm
@@ -6,7 +6,7 @@
; Assume all-caps names are constants
((identifier) @constant
- (#match? @constant "^[A-Z][A-Z\\d_]+$'"))
+ (#vim-match? @constant "^[A-Z][A-Z\\d_]+$'"))
; Other identifiers