aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Clason <c.clason@uni-graz.at>2024-05-05 12:57:36 +0200
committerChristian Clason <c.clason@uni-graz.at>2024-05-05 23:22:11 +0200
commit3d4eb9d544cbbe39544586890b5de83a48de3680 (patch)
treeacb9effe033f76350fe279049d59f52a6d419bca
parent97b7ddc376bfcca01a5fd9e6e20e424a0f45b4f3 (diff)
downloadrneovim-3d4eb9d544cbbe39544586890b5de83a48de3680.tar.gz
rneovim-3d4eb9d544cbbe39544586890b5de83a48de3680.tar.bz2
rneovim-3d4eb9d544cbbe39544586890b5de83a48de3680.zip
fix(treesitter): update queries
-rw-r--r--runtime/queries/bash/highlights.scm2
-rw-r--r--runtime/queries/c/folds.scm1
-rw-r--r--runtime/queries/c/highlights.scm11
-rw-r--r--runtime/queries/markdown_inline/highlights.scm20
-rw-r--r--runtime/queries/python/folds.scm5
-rw-r--r--runtime/queries/python/highlights.scm37
-rw-r--r--runtime/queries/query/highlights.scm6
-rw-r--r--runtime/queries/vim/highlights.scm9
8 files changed, 65 insertions, 26 deletions
diff --git a/runtime/queries/bash/highlights.scm b/runtime/queries/bash/highlights.scm
index 6547bea7ae..feb0e038ea 100644
--- a/runtime/queries/bash/highlights.scm
+++ b/runtime/queries/bash/highlights.scm
@@ -228,5 +228,5 @@
((program
.
- (comment) @keyword.directive)
+ (comment) @keyword.directive @nospell)
(#lua-match? @keyword.directive "^#!/"))
diff --git a/runtime/queries/c/folds.scm b/runtime/queries/c/folds.scm
index 2e2a6b4d0c..bb26a62eb5 100644
--- a/runtime/queries/c/folds.scm
+++ b/runtime/queries/c/folds.scm
@@ -16,6 +16,7 @@
(preproc_function_def)
(initializer_list)
(gnu_asm_expression)
+ (preproc_include)+
] @fold
(compound_statement
diff --git a/runtime/queries/c/highlights.scm b/runtime/queries/c/highlights.scm
index c901b96f31..170937c8f8 100644
--- a/runtime/queries/c/highlights.scm
+++ b/runtime/queries/c/highlights.scm
@@ -7,16 +7,19 @@
[
"default"
- "enum"
- "struct"
- "typedef"
- "union"
"goto"
"asm"
"__asm__"
] @keyword
[
+ "enum"
+ "struct"
+ "union"
+ "typedef"
+] @keyword.type
+
+[
"sizeof"
"offsetof"
] @keyword.operator
diff --git a/runtime/queries/markdown_inline/highlights.scm b/runtime/queries/markdown_inline/highlights.scm
index e38ef3d7b0..233ab411cd 100644
--- a/runtime/queries/markdown_inline/highlights.scm
+++ b/runtime/queries/markdown_inline/highlights.scm
@@ -33,10 +33,17 @@
] @markup.link
(#set! conceal ""))
+[
+ (link_label)
+ (link_text)
+ (link_title)
+ (image_description)
+] @markup.link.label
+
(inline_link
- (link_text) @markup.link.label
- (link_destination) @markup.link
- (#set! @markup.link.label "url" @markup.link))
+ (link_text) @_label
+ (link_destination) @_url
+ (#set! @_label "url" @_url))
; Conceal image links
(image
@@ -80,13 +87,6 @@
(uri_autolink)
] @markup.link.url @nospell
-[
- (link_label)
- (link_text)
- (link_title)
- (image_description)
-] @markup.link.label
-
; Replace common HTML entities.
((entity_reference) @character.special
(#eq? @character.special "&nbsp;")
diff --git a/runtime/queries/python/folds.scm b/runtime/queries/python/folds.scm
index 7c547db38f..ecb9352d78 100644
--- a/runtime/queries/python/folds.scm
+++ b/runtime/queries/python/folds.scm
@@ -21,3 +21,8 @@
(dictionary)
(string)
] @fold
+
+[
+ (import_statement)
+ (import_from_statement)
+]+ @fold
diff --git a/runtime/queries/python/highlights.scm b/runtime/queries/python/highlights.scm
index 4d62aeff06..5e5a2a88de 100644
--- a/runtime/queries/python/highlights.scm
+++ b/runtime/queries/python/highlights.scm
@@ -188,7 +188,7 @@
((module
.
- (comment) @keyword.directive)
+ (comment) @keyword.directive @nospell)
(#lua-match? @keyword.directive "^#!/"))
(string) @string
@@ -204,19 +204,41 @@
(comment)*
.
(expression_statement
- (string) @string.documentation @spell))
+ (string) @string.documentation))
(class_definition
body: (block
.
(expression_statement
- (string) @string.documentation @spell)))
+ (string) @string.documentation)))
(function_definition
body: (block
.
(expression_statement
- (string) @string.documentation @spell)))
+ (string) @string.documentation)))
+
+(module
+ .
+ (comment)*
+ .
+ (expression_statement
+ (string
+ (string_content) @spell)))
+
+(class_definition
+ body: (block
+ .
+ (expression_statement
+ (string
+ (string_content) @spell))))
+
+(function_definition
+ body: (block
+ .
+ (expression_statement
+ (string
+ (string_content) @spell))))
; Tokens
[
@@ -278,7 +300,6 @@
[
"assert"
- "class"
"exec"
"global"
"nonlocal"
@@ -286,10 +307,14 @@
"print"
"with"
"as"
- "type"
] @keyword
[
+ "type"
+ "class"
+] @keyword.type
+
+[
"async"
"await"
] @keyword.coroutine
diff --git a/runtime/queries/query/highlights.scm b/runtime/queries/query/highlights.scm
index abc7aa50ad..210d03dc33 100644
--- a/runtime/queries/query/highlights.scm
+++ b/runtime/queries/query/highlights.scm
@@ -53,17 +53,17 @@
.
(comment)*
.
- (comment) @keyword.import)
+ (comment) @keyword.import @nospell)
(#lua-match? @keyword.import "^;+ *inherits *:"))
((program
.
(comment)*
.
- (comment) @keyword.directive)
+ (comment) @keyword.directive @nospell)
(#lua-match? @keyword.directive "^;+ *extends *$"))
-((comment) @keyword.directive
+((comment) @keyword.directive @nospell
(#lua-match? @keyword.directive "^;+%s*format%-ignore%s*$"))
((predicate
diff --git a/runtime/queries/vim/highlights.scm b/runtime/queries/vim/highlights.scm
index 2950278f9f..14e5a8128f 100644
--- a/runtime/queries/vim/highlights.scm
+++ b/runtime/queries/vim/highlights.scm
@@ -126,6 +126,7 @@
"view"
"eval"
"sign"
+ "abort"
] @keyword
(map_statement
@@ -277,8 +278,6 @@
"/"
"%"
".."
- "is"
- "isnot"
"=="
"!="
">"
@@ -297,9 +296,15 @@
"..="
"<<"
"=<<"
+ "->"
(match_case)
] @operator
+[
+ "is"
+ "isnot"
+] @keyword.operator
+
; Some characters have different meanings based on the context
(unary_operation
"!" @operator)