diff options
| author | Phạm Huy Hoàng <hoangtun0810@gmail.com> | 2024-03-21 20:44:35 +0900 |
|---|---|---|
| committer | Christian Clason <c.clason@uni-graz.at> | 2024-03-21 15:51:26 +0100 |
| commit | 722617e6726c1508adadf83d531f54987c703be0 (patch) | |
| tree | 951cdcf1cd2571647a3e5afdc11d6fae5e88b630 /queries/cairo | |
| parent | feat(rust): improve indents (diff) | |
| download | nvim-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.scm | 39 | ||||
| -rw-r--r-- | queries/cairo/indents.scm | 25 | ||||
| -rw-r--r-- | queries/cairo/locals.scm | 5 |
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) |
