Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'runtime/queries/c/indents.scm')
-rw-r--r--runtime/queries/c/indents.scm20
1 files changed, 1 insertions, 19 deletions
diff --git a/runtime/queries/c/indents.scm b/runtime/queries/c/indents.scm
index 877b6670..353ea81b 100644
--- a/runtime/queries/c/indents.scm
+++ b/runtime/queries/c/indents.scm
@@ -1,10 +1,10 @@
[
(compound_statement)
- (declaration_list)
(field_declaration_list)
(enumerator_list)
(parameter_list)
(init_declarator)
+ (case_statement)
(expression_statement)
] @indent
@@ -12,7 +12,6 @@
"case"
"}"
"]"
- ")"
] @outdent
(if_statement
@@ -32,20 +31,3 @@
(_) @indent
(#not-kind-eq? @indent "compound_statement")
(#set! "scope" "all"))
-
-(parameter_list
- . (parameter_declaration) @anchor
- (#set! "scope" "tail")) @align
-(argument_list
- . (_) @anchor
- (#set! "scope" "tail")) @align
-; These are a bit opinionated since some people just indent binary/ternary expressions spanning multiple lines.
-; Since they are only triggered when a newline is inserted into an already complete binary/ternary expression,
-; this should happen rarely, so it is not a big deal either way.
-; Additionally, adding these queries has the advantage of preventing such continuation lines from being used
-; as the baseline when the `hybrid` indent heuristic is used (which is desirable since their indentation is so inconsistent).
-(binary_expression
- (#set! "scope" "tail")) @anchor @align
-(conditional_expression
- "?" @anchor
- (#set! "scope" "tail")) @align