aboutsummaryrefslogtreecommitdiff
path: root/runtime/queries/query
diff options
context:
space:
mode:
authorChristian Clason <c.clason@uni-graz.at>2023-03-03 14:27:30 +0100
committerGitHub <noreply@github.com>2023-03-03 14:27:30 +0100
commit98e051783c26239a47c5cd643e9aea7146b097bd (patch)
tree79f238252fad0fdb96e0ce7b7c20755b11f841e7 /runtime/queries/query
parent74c9c413e7600c96c1ad35b0433fc63563130eef (diff)
downloadrneovim-98e051783c26239a47c5cd643e9aea7146b097bd.tar.gz
rneovim-98e051783c26239a47c5cd643e9aea7146b097bd.tar.bz2
rneovim-98e051783c26239a47c5cd643e9aea7146b097bd.zip
feat(treesitter): bundle query parser and queries (#22483)
skip injections for now
Diffstat (limited to 'runtime/queries/query')
-rw-r--r--runtime/queries/query/folds.scm6
-rw-r--r--runtime/queries/query/highlights.scm34
2 files changed, 40 insertions, 0 deletions
diff --git a/runtime/queries/query/folds.scm b/runtime/queries/query/folds.scm
new file mode 100644
index 0000000000..47dd965126
--- /dev/null
+++ b/runtime/queries/query/folds.scm
@@ -0,0 +1,6 @@
+[
+ (named_node)
+ (predicate)
+ (grouping)
+ (list)
+] @fold
diff --git a/runtime/queries/query/highlights.scm b/runtime/queries/query/highlights.scm
new file mode 100644
index 0000000000..ee31a7e7ef
--- /dev/null
+++ b/runtime/queries/query/highlights.scm
@@ -0,0 +1,34 @@
+(string) @string
+(escape_sequence) @string.escape
+(capture (identifier) @type)
+(anonymous_node (identifier) @string)
+(predicate name: (identifier) @function)
+(named_node name: (identifier) @variable)
+(field_definition name: (identifier) @property)
+(negated_field "!" @operator (identifier) @property)
+(comment) @comment @spell
+
+(quantifier) @operator
+(predicate_type) @punctuation.special
+
+"." @operator
+
+[
+ "["
+ "]"
+ "("
+ ")"
+] @punctuation.bracket
+
+":" @punctuation.delimiter
+["@" "#"] @punctuation.special
+"_" @constant
+
+((parameters (identifier) @number)
+ (#match? @number "^[-+]?[0-9]+(.[0-9]+)?$"))
+
+((program . (comment) @include)
+ (#match? @include "^;\ +inherits\ *:"))
+
+((program . (comment) @preproc)
+ (#match? @preproc "^; +extends"))