refactor(format): drop extra indentation for field

This commit is contained in:
Phạm Huy Hoàng 2024-03-21 20:44:35 +09:00 committed by Christian Clason
parent c28396de30
commit 722617e672
140 changed files with 2146 additions and 2766 deletions

View file

@ -55,27 +55,23 @@
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))
(generic_function
function: (identifier) @function.call)
(generic_function
function:
(scoped_identifier
name: (identifier) @function.call))
function: (scoped_identifier
name: (identifier) @function.call))
(generic_function
function:
(field_expression
field: (field_identifier) @function.call))
function: (field_expression
field: (field_identifier) @function.call))
; Assume other uppercase names are enum constructors
((field_identifier) @constant
@ -136,9 +132,8 @@
path: (identifier) @module)
(scoped_use_list
path:
(scoped_identifier
(identifier) @module))
path: (scoped_identifier
(identifier) @module))
(use_list
(scoped_identifier
@ -156,24 +151,21 @@
; Correct enum constructors
(call_expression
function:
(scoped_identifier
"::"
name: (identifier) @constant)
function: (scoped_identifier
"::"
name: (identifier) @constant)
(#lua-match? @constant "^[A-Z]"))
; Assume uppercase names in a match arm are constants.
((match_arm
pattern:
(match_pattern
(identifier) @constant))
pattern: (match_pattern
(identifier) @constant))
(#lua-match? @constant "^[A-Z]"))
((match_arm
pattern:
(match_pattern
(scoped_identifier
name: (identifier) @constant)))
pattern: (match_pattern
(scoped_identifier
name: (identifier) @constant)))
(#lua-match? @constant "^[A-Z]"))
((identifier) @constant.builtin
@ -210,9 +202,8 @@
macro: (identifier) @function.macro)
(macro_invocation
macro:
(scoped_identifier
(identifier) @function.macro .))
macro: (scoped_identifier
(identifier) @function.macro .))
; Literals
[