aboutsummaryrefslogtreecommitdiffstats
path: root/queries/cairo
diff options
context:
space:
mode:
authorPhạm Huy Hoàng <hoangtun0810@gmail.com>2024-03-21 20:44:35 +0900
committerChristian Clason <c.clason@uni-graz.at>2024-03-21 15:51:26 +0100
commit722617e6726c1508adadf83d531f54987c703be0 (patch)
tree951cdcf1cd2571647a3e5afdc11d6fae5e88b630 /queries/cairo
parentfeat(rust): improve indents (diff)
downloadnvim-treesitter-722617e6726c1508adadf83d531f54987c703be0.tar
nvim-treesitter-722617e6726c1508adadf83d531f54987c703be0.tar.gz
nvim-treesitter-722617e6726c1508adadf83d531f54987c703be0.tar.bz2
nvim-treesitter-722617e6726c1508adadf83d531f54987c703be0.tar.lz
nvim-treesitter-722617e6726c1508adadf83d531f54987c703be0.tar.xz
nvim-treesitter-722617e6726c1508adadf83d531f54987c703be0.tar.zst
nvim-treesitter-722617e6726c1508adadf83d531f54987c703be0.zip
refactor(format): drop extra indentation for field
Diffstat (limited to 'queries/cairo')
-rw-r--r--queries/cairo/highlights.scm39
-rw-r--r--queries/cairo/indents.scm25
-rw-r--r--queries/cairo/locals.scm5
3 files changed, 28 insertions, 41 deletions
diff --git a/queries/cairo/highlights.scm b/queries/cairo/highlights.scm
index e7a4faf9c..be4a749c4 100644
--- a/queries/cairo/highlights.scm
+++ b/queries/cairo/highlights.scm
@@ -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:
- (scoped_identifier
- "::"
- name: (identifier) @constant)
+ function: (scoped_identifier
+ "::"
+ name: (identifier) @constant)
(#lua-match? @constant "^[A-Z]"))
((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
diff --git a/queries/cairo/indents.scm b/queries/cairo/indents.scm
index a97bd24a4..f63ef36fe 100644
--- a/queries/cairo/indents.scm
+++ b/queries/cairo/indents.scm
@@ -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))
[
")"
diff --git a/queries/cairo/locals.scm b/queries/cairo/locals.scm
index 27ec73542..0573cf6db 100644
--- a/queries/cairo/locals.scm
+++ b/queries/cairo/locals.scm
@@ -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)