mirror of
				https://github.com/neovim/neovim.git
				synced 2025-11-04 09:44:31 +00:00 
			
		
		
		
	fix(treesitter): update queries
This commit is contained in:
		@@ -228,5 +228,5 @@
 | 
			
		||||
 | 
			
		||||
((program
 | 
			
		||||
  .
 | 
			
		||||
  (comment) @keyword.directive)
 | 
			
		||||
  (comment) @keyword.directive @nospell)
 | 
			
		||||
  (#lua-match? @keyword.directive "^#!/"))
 | 
			
		||||
 
 | 
			
		||||
@@ -16,6 +16,7 @@
 | 
			
		||||
  (preproc_function_def)
 | 
			
		||||
  (initializer_list)
 | 
			
		||||
  (gnu_asm_expression)
 | 
			
		||||
  (preproc_include)+
 | 
			
		||||
] @fold
 | 
			
		||||
 | 
			
		||||
(compound_statement
 | 
			
		||||
 
 | 
			
		||||
@@ -7,15 +7,18 @@
 | 
			
		||||
 | 
			
		||||
[
 | 
			
		||||
  "default"
 | 
			
		||||
  "enum"
 | 
			
		||||
  "struct"
 | 
			
		||||
  "typedef"
 | 
			
		||||
  "union"
 | 
			
		||||
  "goto"
 | 
			
		||||
  "asm"
 | 
			
		||||
  "__asm__"
 | 
			
		||||
] @keyword
 | 
			
		||||
 | 
			
		||||
[
 | 
			
		||||
  "enum"
 | 
			
		||||
  "struct"
 | 
			
		||||
  "union"
 | 
			
		||||
  "typedef"
 | 
			
		||||
] @keyword.type
 | 
			
		||||
 | 
			
		||||
[
 | 
			
		||||
  "sizeof"
 | 
			
		||||
  "offsetof"
 | 
			
		||||
 
 | 
			
		||||
@@ -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 " ")
 | 
			
		||||
 
 | 
			
		||||
@@ -21,3 +21,8 @@
 | 
			
		||||
  (dictionary)
 | 
			
		||||
  (string)
 | 
			
		||||
] @fold
 | 
			
		||||
 | 
			
		||||
[
 | 
			
		||||
  (import_statement)
 | 
			
		||||
  (import_from_statement)
 | 
			
		||||
]+ @fold
 | 
			
		||||
 
 | 
			
		||||
@@ -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"
 | 
			
		||||
 
 | 
			
		||||
@@ -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
 | 
			
		||||
 
 | 
			
		||||
@@ -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)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user