mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-11 07:50:07 -04:00
ci: fix wrong queries
This commit is contained in:
parent
5d2b866518
commit
b90e520ccd
10 changed files with 22 additions and 23 deletions
|
|
@ -96,12 +96,12 @@
|
||||||
destination: (word) @parameter)
|
destination: (word) @parameter)
|
||||||
|
|
||||||
|
|
||||||
("$" (variable_name)) @identifier
|
("$" (variable_name)) @variable
|
||||||
|
|
||||||
(expansion
|
(expansion
|
||||||
[ "${" "}" ] @punctuation.bracket)
|
[ "${" "}" ] @punctuation.bracket)
|
||||||
|
|
||||||
(variable_name) @identifier
|
(variable_name) @variable
|
||||||
|
|
||||||
(case_item
|
(case_item
|
||||||
value: (word) @parameter)
|
value: (word) @parameter)
|
||||||
|
|
|
||||||
|
|
@ -124,6 +124,6 @@
|
||||||
|
|
||||||
; Annotations (not fully supported by parser)
|
; Annotations (not fully supported by parser)
|
||||||
|
|
||||||
((ERROR) @annotation
|
((ERROR) @attribute
|
||||||
(vim-match? @annotation "\[?\[.*\]\]?.*$"))
|
(vim-match? @attribute "\[?\[.*\]\]?.*$"))
|
||||||
(attribute) @annotation
|
(attribute) @attribute
|
||||||
|
|
|
||||||
|
|
@ -8,9 +8,9 @@
|
||||||
|
|
||||||
; Annotations
|
; Annotations
|
||||||
(annotation
|
(annotation
|
||||||
name: (identifier) @annotation)
|
name: (identifier) @attribute)
|
||||||
(marker_annotation
|
(marker_annotation
|
||||||
name: (identifier) @annotation)
|
name: (identifier) @attribute)
|
||||||
|
|
||||||
; Operators and Tokens
|
; Operators and Tokens
|
||||||
|
|
||||||
|
|
@ -123,7 +123,7 @@
|
||||||
name: (identifier) @parameter)
|
name: (identifier) @parameter)
|
||||||
|
|
||||||
(named_argument
|
(named_argument
|
||||||
(label (identifier) @variable.parameter))
|
(label (identifier) @parameter))
|
||||||
|
|
||||||
; Literals
|
; Literals
|
||||||
|
|
||||||
|
|
@ -136,7 +136,7 @@
|
||||||
; (hex_floating_point_literal)
|
; (hex_floating_point_literal)
|
||||||
] @number
|
] @number
|
||||||
|
|
||||||
(symbol_literal) @string.special.symbol
|
(symbol_literal) @string.special
|
||||||
(string_literal) @string
|
(string_literal) @string
|
||||||
(true) @boolean
|
(true) @boolean
|
||||||
(false) @boolean
|
(false) @boolean
|
||||||
|
|
|
||||||
|
|
@ -121,7 +121,7 @@
|
||||||
(interpreted_string_literal) @string
|
(interpreted_string_literal) @string
|
||||||
(raw_string_literal) @string
|
(raw_string_literal) @string
|
||||||
(rune_literal) @string
|
(rune_literal) @string
|
||||||
(escape_sequence) @escape
|
(escape_sequence) @string.escape
|
||||||
|
|
||||||
(int_literal) @number
|
(int_literal) @number
|
||||||
(float_literal) @float
|
(float_literal) @float
|
||||||
|
|
|
||||||
|
|
@ -41,24 +41,24 @@
|
||||||
|
|
||||||
;; Call references
|
;; Call references
|
||||||
((call_expression
|
((call_expression
|
||||||
function: (identifier) @reference) @call
|
function: (identifier) @reference)
|
||||||
(set! reference.kind "call" ))
|
(set! reference.kind "call" ))
|
||||||
|
|
||||||
((call_expression
|
((call_expression
|
||||||
function: (selector_expression
|
function: (selector_expression
|
||||||
field: (field_identifier) @reference)) @call
|
field: (field_identifier) @reference))
|
||||||
(set! reference.kind "call" ))
|
(set! reference.kind "call" ))
|
||||||
|
|
||||||
|
|
||||||
((call_expression
|
((call_expression
|
||||||
function: (parenthesized_expression
|
function: (parenthesized_expression
|
||||||
(identifier) @reference)) @call
|
(identifier) @reference))
|
||||||
(set! reference.kind "call" ))
|
(set! reference.kind "call" ))
|
||||||
|
|
||||||
((call_expression
|
((call_expression
|
||||||
function: (parenthesized_expression
|
function: (parenthesized_expression
|
||||||
(selector_expression
|
(selector_expression
|
||||||
field: (field_identifier) @reference))) @call
|
field: (field_identifier) @reference)))
|
||||||
(set! reference.kind "call" ))
|
(set! reference.kind "call" ))
|
||||||
|
|
||||||
;; Scopes
|
;; Scopes
|
||||||
|
|
|
||||||
|
|
@ -35,15 +35,14 @@
|
||||||
; Functions
|
; Functions
|
||||||
|
|
||||||
(constructor_declaration) @scope
|
(constructor_declaration) @scope
|
||||||
(method_declaration
|
(method_declaration) @scope
|
||||||
name: (identifier) @definition.scope) @scope
|
|
||||||
|
|
||||||
|
|
||||||
; DEFINITIONS
|
; DEFINITIONS
|
||||||
(package_declaration
|
(package_declaration
|
||||||
(identifier) @definition.namespace)
|
(identifier) @definition.namespace)
|
||||||
(class_declaration
|
(class_declaration
|
||||||
name: (identifier) @definition.class)
|
name: (identifier) @definition.type)
|
||||||
(enum_declaration
|
(enum_declaration
|
||||||
name: (identifier) @definition.enum)
|
name: (identifier) @definition.enum)
|
||||||
(method_declaration
|
(method_declaration
|
||||||
|
|
|
||||||
|
|
@ -9,4 +9,4 @@
|
||||||
(jsx_opening_element name: (identifier) @variable.builtin)
|
(jsx_opening_element name: (identifier) @variable.builtin)
|
||||||
(jsx_self_closing_element name: (identifier) @variable.builtin)
|
(jsx_self_closing_element name: (identifier) @variable.builtin)
|
||||||
|
|
||||||
(jsx_text) @none
|
(jsx_text) @Normal
|
||||||
|
|
|
||||||
|
|
@ -32,10 +32,10 @@
|
||||||
|
|
||||||
(namespace_use_clause
|
(namespace_use_clause
|
||||||
(qualified_name
|
(qualified_name
|
||||||
(name) @definition.class))
|
(name) @definition.type))
|
||||||
|
|
||||||
(class_declaration
|
(class_declaration
|
||||||
name: (name) @definition.class)
|
name: (name) @definition.type)
|
||||||
|
|
||||||
; References
|
; References
|
||||||
;------------
|
;------------
|
||||||
|
|
|
||||||
|
|
@ -67,11 +67,11 @@
|
||||||
(identifier) @type)) ; type subscript: Tuple[int]
|
(identifier) @type)) ; type subscript: Tuple[int]
|
||||||
|
|
||||||
((call
|
((call
|
||||||
function: (identifier) @isinstance
|
function: (identifier) @_isinstance
|
||||||
arguments: (argument_list
|
arguments: (argument_list
|
||||||
(_)
|
(_)
|
||||||
(identifier) @type))
|
(identifier) @type))
|
||||||
(#eq? @isinstance "isinstance"))
|
(#eq? @_isinstance "isinstance"))
|
||||||
|
|
||||||
; Normal parameters
|
; Normal parameters
|
||||||
(parameters
|
(parameters
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,6 @@
|
||||||
(end_assertion)
|
(end_assertion)
|
||||||
(boundary_assertion)
|
(boundary_assertion)
|
||||||
(non_boundary_assertion)
|
(non_boundary_assertion)
|
||||||
] @escape
|
] @string.escape
|
||||||
|
|
||||||
[ "*" "+" "|" "=" "<=" "!" "<!" ] @operator
|
[ "*" "+" "|" "=" "<=" "!" "<!" ] @operator
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue