mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-19 20:00:07 -04:00
refactor(format): drop extra indentation for field
This commit is contained in:
parent
c28396de30
commit
722617e672
140 changed files with 2146 additions and 2766 deletions
|
|
@ -199,14 +199,12 @@
|
|||
name: (identifier) @function)
|
||||
|
||||
(function_call
|
||||
name:
|
||||
(dot_index_expression
|
||||
field: (identifier) @function.call))
|
||||
name: (dot_index_expression
|
||||
field: (identifier) @function.call))
|
||||
|
||||
(function_declaration
|
||||
name:
|
||||
(dot_index_expression
|
||||
field: (identifier) @function))
|
||||
name: (dot_index_expression
|
||||
field: (identifier) @function))
|
||||
|
||||
(method_index_expression
|
||||
method: (identifier) @function.method.call)
|
||||
|
|
@ -256,13 +254,12 @@
|
|||
] @punctuation.bracket
|
||||
|
||||
(variable_list
|
||||
attribute:
|
||||
(attribute
|
||||
([
|
||||
"<"
|
||||
">"
|
||||
] @punctuation.bracket
|
||||
(identifier) @attribute)))
|
||||
attribute: (attribute
|
||||
([
|
||||
"<"
|
||||
">"
|
||||
] @punctuation.bracket
|
||||
(identifier) @attribute)))
|
||||
|
||||
(generic_type
|
||||
[
|
||||
|
|
@ -290,21 +287,19 @@
|
|||
(dot_index_expression
|
||||
field: (identifier) @_method
|
||||
(#any-of? @_method "find" "format" "match" "gmatch" "gsub"))
|
||||
arguments:
|
||||
(arguments
|
||||
.
|
||||
(_)
|
||||
.
|
||||
(string
|
||||
content: _ @string.regexp)))
|
||||
arguments: (arguments
|
||||
.
|
||||
(_)
|
||||
.
|
||||
(string
|
||||
content: _ @string.regexp)))
|
||||
|
||||
; ("123"):match("%d+")
|
||||
(function_call
|
||||
(method_index_expression
|
||||
method: (identifier) @_method
|
||||
(#any-of? @_method "find" "format" "match" "gmatch" "gsub"))
|
||||
arguments:
|
||||
(arguments
|
||||
.
|
||||
(string
|
||||
content: _ @string.regexp)))
|
||||
arguments: (arguments
|
||||
.
|
||||
(string
|
||||
content: _ @string.regexp)))
|
||||
|
|
|
|||
|
|
@ -1,15 +1,13 @@
|
|||
((function_call
|
||||
name:
|
||||
[
|
||||
(identifier) @_cdef_identifier
|
||||
(_
|
||||
_
|
||||
(identifier) @_cdef_identifier)
|
||||
]
|
||||
arguments:
|
||||
(arguments
|
||||
(string
|
||||
content: _ @injection.content)))
|
||||
name: [
|
||||
(identifier) @_cdef_identifier
|
||||
(_
|
||||
_
|
||||
(identifier) @_cdef_identifier)
|
||||
]
|
||||
arguments: (arguments
|
||||
(string
|
||||
content: _ @injection.content)))
|
||||
(#eq? @_cdef_identifier "cdef")
|
||||
(#set! injection.language "c"))
|
||||
|
||||
|
|
@ -23,13 +21,12 @@
|
|||
(dot_index_expression
|
||||
field: (identifier) @_method
|
||||
(#any-of? @_method "find" "format" "match" "gmatch" "gsub"))
|
||||
arguments:
|
||||
(arguments
|
||||
.
|
||||
(_)
|
||||
.
|
||||
(string
|
||||
content: _ @injection.content))
|
||||
arguments: (arguments
|
||||
.
|
||||
(_)
|
||||
.
|
||||
(string
|
||||
content: _ @injection.content))
|
||||
(#set! injection.language "luap"))
|
||||
|
||||
; ("123"):match("%d+")
|
||||
|
|
@ -37,11 +34,10 @@
|
|||
(method_index_expression
|
||||
method: (identifier) @_method
|
||||
(#any-of? @_method "find" "format" "match" "gmatch" "gsub"))
|
||||
arguments:
|
||||
(arguments
|
||||
.
|
||||
(string
|
||||
content: _ @injection.content))
|
||||
arguments: (arguments
|
||||
.
|
||||
(string
|
||||
content: _ @injection.content))
|
||||
(#set! injection.language "luap"))
|
||||
|
||||
((comment) @injection.content
|
||||
|
|
|
|||
|
|
@ -30,19 +30,17 @@
|
|||
(#set! definition.function.scope "parent"))
|
||||
|
||||
((function_declaration
|
||||
name:
|
||||
(dot_index_expression
|
||||
.
|
||||
(_) @local.definition.associated
|
||||
(identifier) @local.definition.function))
|
||||
name: (dot_index_expression
|
||||
.
|
||||
(_) @local.definition.associated
|
||||
(identifier) @local.definition.function))
|
||||
(#set! definition.method.scope "parent"))
|
||||
|
||||
((function_declaration
|
||||
name:
|
||||
(method_index_expression
|
||||
.
|
||||
(_) @local.definition.associated
|
||||
(identifier) @local.definition.method))
|
||||
name: (method_index_expression
|
||||
.
|
||||
(_) @local.definition.associated
|
||||
(identifier) @local.definition.method))
|
||||
(#set! definition.method.scope "parent"))
|
||||
|
||||
(for_generic_clause
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue