mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-13 00:40: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,10 +1,10 @@
|
|||
[
|
||||
(field)
|
||||
(object)
|
||||
(array)
|
||||
(parenthesis)
|
||||
(bind)
|
||||
; (params)
|
||||
; (args)
|
||||
; (conditional)
|
||||
(field)
|
||||
(object)
|
||||
(array)
|
||||
(parenthesis)
|
||||
(bind)
|
||||
; (params)
|
||||
; (args)
|
||||
; (conditional)
|
||||
] @fold
|
||||
|
|
|
|||
|
|
@ -1,10 +1,14 @@
|
|||
(id) @variable
|
||||
|
||||
(comment) @comment @spell
|
||||
|
||||
; Literals
|
||||
(null) @constant.builtin
|
||||
|
||||
(string) @string
|
||||
|
||||
(number) @number
|
||||
|
||||
[
|
||||
(true)
|
||||
(false)
|
||||
|
|
@ -12,7 +16,9 @@
|
|||
|
||||
; Keywords
|
||||
"for" @keyword.repeat
|
||||
|
||||
"in" @keyword.operator
|
||||
|
||||
"function" @keyword.function
|
||||
|
||||
[
|
||||
|
|
@ -37,8 +43,9 @@
|
|||
(self)
|
||||
(super)
|
||||
] @variable.builtin
|
||||
|
||||
((id) @variable.builtin
|
||||
(#eq? @variable.builtin "std"))
|
||||
(#eq? @variable.builtin "std"))
|
||||
|
||||
; Operators
|
||||
[
|
||||
|
|
@ -78,7 +85,8 @@
|
|||
] @punctuation.special
|
||||
|
||||
(field
|
||||
(fieldname) "+" @punctuation.special)
|
||||
(fieldname)
|
||||
"+" @punctuation.special)
|
||||
|
||||
; Imports
|
||||
[
|
||||
|
|
@ -87,21 +95,33 @@
|
|||
] @keyword.import
|
||||
|
||||
; Fields
|
||||
(fieldname
|
||||
(id) @variable.member)
|
||||
|
||||
(fieldname (id) @variable.member)
|
||||
(fieldname (string (string_content) @variable.member))
|
||||
(fieldname
|
||||
(string
|
||||
(string_content) @variable.member))
|
||||
|
||||
; Functions
|
||||
(field
|
||||
function: (fieldname (id) @function))
|
||||
function:
|
||||
(fieldname
|
||||
(id) @function))
|
||||
|
||||
(field
|
||||
function: (fieldname
|
||||
(string (string_content) @function)))
|
||||
function:
|
||||
(fieldname
|
||||
(string
|
||||
(string_content) @function)))
|
||||
|
||||
(param
|
||||
identifier: (id) @variable.parameter)
|
||||
|
||||
(bind (id) @variable.local)
|
||||
(bind function: (id) @function)
|
||||
(bind
|
||||
(id) @variable.local)
|
||||
|
||||
(bind
|
||||
function: (id) @function)
|
||||
|
||||
; Function call
|
||||
(functioncall
|
||||
|
|
@ -113,6 +133,5 @@
|
|||
"("
|
||||
(args
|
||||
(named_argument
|
||||
(id) @variable.parameter
|
||||
))?
|
||||
(id) @variable.parameter))?
|
||||
")")
|
||||
|
|
|
|||
|
|
@ -1,17 +1,28 @@
|
|||
(parenthesis) @local.scope
|
||||
|
||||
(anonymous_function) @local.scope
|
||||
|
||||
(object) @local.scope
|
||||
|
||||
(field) @local.scope
|
||||
|
||||
(local_bind) @local.scope
|
||||
|
||||
(field
|
||||
function: (fieldname (id) @local.definition.function)
|
||||
function:
|
||||
(fieldname
|
||||
(id) @local.definition.function)
|
||||
(#set! "definition.function.scope" "parent"))
|
||||
|
||||
(bind (id) @local.definition.var)
|
||||
(bind function: (id) @local.definition.function)
|
||||
(bind
|
||||
(id) @local.definition.var)
|
||||
|
||||
(param (id) @local.definition.parameter)
|
||||
(bind
|
||||
function: (id) @local.definition.function)
|
||||
|
||||
(param
|
||||
(id) @local.definition.parameter)
|
||||
|
||||
(id) @local.reference
|
||||
|
||||
;(fieldname (id) (#is-not? local)) ; (#is-not?) not supported yet
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue