fix(treesitter): update queries

This commit is contained in:
Christian Clason
2024-05-05 12:57:36 +02:00
parent 97b7ddc376
commit 3d4eb9d544
8 changed files with 65 additions and 26 deletions

View File

@@ -21,3 +21,8 @@
(dictionary)
(string)
] @fold
[
(import_statement)
(import_from_statement)
]+ @fold

View File

@@ -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,9 +307,13 @@
"print"
"with"
"as"
"type"
] @keyword
[
"type"
"class"
] @keyword.type
[
"async"
"await"