mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-11 07:50:07 -04:00
indents(c): add zero_indent for #if
This commit is contained in:
parent
616dc885fc
commit
fd5a551d7c
7 changed files with 18 additions and 13 deletions
|
|
@ -26,16 +26,20 @@
|
|||
|
||||
(compound_statement "}" @indent_end)
|
||||
|
||||
[
|
||||
"else"
|
||||
")"
|
||||
"}"
|
||||
(statement_identifier)
|
||||
] @branch
|
||||
|
||||
[
|
||||
"#define"
|
||||
"#ifdef"
|
||||
"#if"
|
||||
"#else"
|
||||
"else"
|
||||
"#endif"
|
||||
")"
|
||||
"}"
|
||||
] @branch
|
||||
] @zero_indent
|
||||
|
||||
[
|
||||
(preproc_arg)
|
||||
|
|
@ -47,7 +51,7 @@
|
|||
([(argument_list) (parameter_list)] @aligned_indent
|
||||
(#set! "delimiter" "()"))
|
||||
|
||||
([ (ERROR) (comment) ] @aligned_indent
|
||||
((comment) @aligned_indent
|
||||
(#lua-match? @aligned_indent "^/\*"))
|
||||
((comment) @ignore
|
||||
(#lua-match? @ignore "^//"))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue