mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-11 07:50:07 -04:00
fix(indent): rust - support newline after closing brace
This commit is contained in:
parent
7a6d93ca5b
commit
c2e3938510
2 changed files with 23 additions and 0 deletions
|
|
@ -27,6 +27,20 @@
|
|||
(trait_item body: (_) @indent)
|
||||
(string_literal (escape_sequence)) @indent
|
||||
|
||||
(block "}" @indent_end)
|
||||
(enum_item
|
||||
body: (enum_variant_list "}" @indent_end))
|
||||
(impl_item
|
||||
body: (declaration_list "}" @indent_end))
|
||||
(match_expression
|
||||
body: (match_block "}" @indent_end))
|
||||
(mod_item
|
||||
body: (declaration_list "}" @indent_end))
|
||||
(struct_item
|
||||
body: (field_declaration_list "}" @indent_end))
|
||||
(trait_item
|
||||
body: (declaration_list "}" @indent_end))
|
||||
|
||||
(impl_item (where_clause) @dedent)
|
||||
|
||||
[
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue