mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-17 10:50:06 -04:00
chore: query formatting
This commit is contained in:
parent
79975d6557
commit
57a8acf0c4
674 changed files with 18466 additions and 12648 deletions
|
|
@ -1,6 +1,6 @@
|
|||
[
|
||||
(comment)
|
||||
(block)
|
||||
(heredoc_template)
|
||||
(object)
|
||||
(comment)
|
||||
(block)
|
||||
(heredoc_template)
|
||||
(object)
|
||||
] @fold
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
; highlights.scm
|
||||
|
||||
[
|
||||
"!"
|
||||
"\*"
|
||||
|
|
@ -76,22 +75,45 @@
|
|||
] @punctuation.special
|
||||
|
||||
(numeric_lit) @number
|
||||
|
||||
(bool_lit) @boolean
|
||||
|
||||
(null_lit) @constant
|
||||
|
||||
(comment) @comment @spell
|
||||
|
||||
(identifier) @variable
|
||||
|
||||
(body (block (identifier) @keyword))
|
||||
(body (block (body (block (identifier) @type))))
|
||||
(function_call (identifier) @function)
|
||||
(attribute (identifier) @variable.member)
|
||||
(body
|
||||
(block
|
||||
(identifier) @keyword))
|
||||
|
||||
(body
|
||||
(block
|
||||
(body
|
||||
(block
|
||||
(identifier) @type))))
|
||||
|
||||
(function_call
|
||||
(identifier) @function)
|
||||
|
||||
(attribute
|
||||
(identifier) @variable.member)
|
||||
|
||||
; { key: val }
|
||||
;
|
||||
; highlight identifier keys as though they were block attributes
|
||||
(object_elem key: (expression (variable_expr (identifier) @variable.member)))
|
||||
(object_elem
|
||||
key:
|
||||
(expression
|
||||
(variable_expr
|
||||
(identifier) @variable.member)))
|
||||
|
||||
; var.foo, data.bar
|
||||
;
|
||||
; first element in get_attr is a variable.builtin or a reference to a variable.builtin
|
||||
(expression (variable_expr (identifier) @variable.builtin) (get_attr (identifier) @variable.member))
|
||||
(expression
|
||||
(variable_expr
|
||||
(identifier) @variable.builtin)
|
||||
(get_attr
|
||||
(identifier) @variable.member))
|
||||
|
|
|
|||
|
|
@ -12,4 +12,5 @@
|
|||
] @indent.branch @indent.end
|
||||
|
||||
(comment) @indent.auto
|
||||
|
||||
(ERROR) @indent.auto
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
((comment) @injection.content
|
||||
(#set! injection.language "comment"))
|
||||
(#set! injection.language "comment"))
|
||||
|
||||
(heredoc_template
|
||||
(template_literal) @injection.content
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue