mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-19 03:40:04 -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
|
|
@ -10,9 +10,8 @@
|
|||
"from"
|
||||
"import"
|
||||
] @keyword.import
|
||||
module_name:
|
||||
(dotted_name
|
||||
(identifier) @module .))
|
||||
module_name: (dotted_name
|
||||
(identifier) @module .))
|
||||
|
||||
[
|
||||
"as"
|
||||
|
|
@ -74,9 +73,8 @@
|
|||
path: (identifier) @module)
|
||||
|
||||
(scoped_use_list
|
||||
path:
|
||||
(scoped_identifier
|
||||
(identifier) @module))
|
||||
path: (scoped_identifier
|
||||
(identifier) @module))
|
||||
|
||||
(use_list
|
||||
(scoped_identifier
|
||||
|
|
@ -228,14 +226,12 @@
|
|||
function: (identifier) @function.call)
|
||||
|
||||
(call_expression
|
||||
function:
|
||||
(scoped_identifier
|
||||
(identifier) @function.call .))
|
||||
function: (scoped_identifier
|
||||
(identifier) @function.call .))
|
||||
|
||||
(call_expression
|
||||
function:
|
||||
(field_expression
|
||||
field: (field_identifier) @function.call))
|
||||
function: (field_expression
|
||||
field: (field_identifier) @function.call))
|
||||
|
||||
"jmp" @function.builtin
|
||||
|
||||
|
|
@ -267,23 +263,20 @@
|
|||
name: (identifier) @constant)
|
||||
|
||||
(call_expression
|
||||
function:
|
||||
function: (scoped_identifier
|
||||
"::"
|
||||
name: (identifier) @constant)
|
||||
(#lua-match? @constant "^[A-Z]"))
|
||||
|
||||
((match_arm
|
||||
pattern: (match_pattern
|
||||
(identifier) @constant))
|
||||
(#lua-match? @constant "^[A-Z]"))
|
||||
|
||||
((match_arm
|
||||
pattern: (match_pattern
|
||||
(scoped_identifier
|
||||
"::"
|
||||
name: (identifier) @constant)
|
||||
(#lua-match? @constant "^[A-Z]"))
|
||||
|
||||
((match_arm
|
||||
pattern:
|
||||
(match_pattern
|
||||
(identifier) @constant))
|
||||
(#lua-match? @constant "^[A-Z]"))
|
||||
|
||||
((match_arm
|
||||
pattern:
|
||||
(match_pattern
|
||||
(scoped_identifier
|
||||
name: (identifier) @constant)))
|
||||
name: (identifier) @constant)))
|
||||
(#lua-match? @constant "^[A-Z]"))
|
||||
|
||||
((identifier) @constant.builtin
|
||||
|
|
|
|||
|
|
@ -25,29 +25,24 @@
|
|||
"}" @indent.end)
|
||||
|
||||
(enum_item
|
||||
body:
|
||||
(enum_variant_list
|
||||
"}" @indent.end))
|
||||
body: (enum_variant_list
|
||||
"}" @indent.end))
|
||||
|
||||
(match_expression
|
||||
body:
|
||||
(match_block
|
||||
"}" @indent.end))
|
||||
body: (match_block
|
||||
"}" @indent.end))
|
||||
|
||||
(mod_item
|
||||
body:
|
||||
(declaration_list
|
||||
"}" @indent.end))
|
||||
body: (declaration_list
|
||||
"}" @indent.end))
|
||||
|
||||
(struct_item
|
||||
body:
|
||||
(field_declaration_list
|
||||
"}" @indent.end))
|
||||
body: (field_declaration_list
|
||||
"}" @indent.end))
|
||||
|
||||
(trait_item
|
||||
body:
|
||||
(declaration_list
|
||||
"}" @indent.end))
|
||||
body: (declaration_list
|
||||
"}" @indent.end))
|
||||
|
||||
[
|
||||
")"
|
||||
|
|
|
|||
|
|
@ -22,9 +22,8 @@
|
|||
] @local.scope
|
||||
|
||||
(use_declaration
|
||||
argument:
|
||||
(scoped_identifier
|
||||
name: (identifier) @local.definition.import))
|
||||
argument: (scoped_identifier
|
||||
name: (identifier) @local.definition.import))
|
||||
|
||||
(use_as_clause
|
||||
alias: (identifier) @local.definition.import)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue