mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-13 17:00:09 -04:00
feat: rewrite indent module
This commit is contained in:
parent
baf94219aa
commit
c0110e34aa
13 changed files with 136 additions and 182 deletions
|
|
@ -16,19 +16,31 @@
|
|||
(block)
|
||||
(where_clause)
|
||||
(use_list)
|
||||
(array_expression)
|
||||
(ordered_field_declaration_list)
|
||||
(field_declaration_list)
|
||||
(enum_variant_list)
|
||||
(parameters)
|
||||
(token_tree)
|
||||
(macro_definition)
|
||||
] @indent
|
||||
(trait_item body: (_) @indent)
|
||||
(string_literal (escape_sequence)) @indent
|
||||
|
||||
(impl_item (where_clause) @dedent)
|
||||
|
||||
[
|
||||
"where"
|
||||
"("
|
||||
")"
|
||||
"["
|
||||
"]"
|
||||
"{"
|
||||
"}"
|
||||
] @branch
|
||||
(impl_item (declaration_list) @branch)
|
||||
|
||||
[
|
||||
(line_comment)
|
||||
(raw_string_literal)
|
||||
(string_literal)
|
||||
] @ignore
|
||||
|
||||
|
||||
(raw_string_literal) @auto
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue