mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-14 09:20:04 -04:00
feat: rewrite indent module
This commit is contained in:
parent
baf94219aa
commit
c0110e34aa
13 changed files with 136 additions and 182 deletions
|
|
@ -8,18 +8,38 @@
|
|||
(enumerator_list)
|
||||
(struct_specifier)
|
||||
(compound_literal_expression)
|
||||
(parameter_list)
|
||||
(initializer_list)
|
||||
(concatenated_string)
|
||||
(while_statement)
|
||||
(for_statement)
|
||||
(switch_statement)
|
||||
] @indent
|
||||
|
||||
(if_statement condition: (_) @indent)
|
||||
((if_statement
|
||||
consequence: (_) @_consequence
|
||||
(#not-has-type? @_consequence compound_statement)
|
||||
) @indent)
|
||||
(init_declarator
|
||||
value: [
|
||||
(binary_expression)
|
||||
] @indent)
|
||||
|
||||
[
|
||||
"#define"
|
||||
"#ifdef"
|
||||
"#if"
|
||||
"#else"
|
||||
"else"
|
||||
"#endif"
|
||||
"{"
|
||||
")"
|
||||
"}"
|
||||
] @branch
|
||||
|
||||
[
|
||||
(comment)
|
||||
(preproc_function_def)
|
||||
(preproc_arg)
|
||||
(string_literal)
|
||||
] @ignore
|
||||
|
||||
(binary_expression) @auto
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue