aboutsummaryrefslogtreecommitdiff
path: root/runtime/queries/c
diff options
context:
space:
mode:
authorDaniel Ebert2023-08-11 10:24:37 +0000
committerBlaž Hrastnik2023-08-11 14:44:02 +0000
commit36a59e4482120e66980b7f8f260a174b82b9415d (patch)
treedfc184a5c86d8cefdbc7e4313320c3230331db3f /runtime/queries/c
parenteab0d4fa4b5c3a98d94b90acf54fd22692148ce3 (diff)
Improve C, Rust & Python indent queries & add @align captures.
Diffstat (limited to 'runtime/queries/c')
-rw-r--r--runtime/queries/c/indents.scm6
1 files changed, 5 insertions, 1 deletions
diff --git a/runtime/queries/c/indents.scm b/runtime/queries/c/indents.scm
index 81286785..058d8031 100644
--- a/runtime/queries/c/indents.scm
+++ b/runtime/queries/c/indents.scm
@@ -5,7 +5,6 @@
(enumerator_list)
(parameter_list)
(init_declarator)
- (case_statement)
(expression_statement)
] @indent
@@ -13,6 +12,7 @@
"case"
"}"
"]"
+ ")"
] @outdent
(if_statement
@@ -32,3 +32,7 @@
(_) @indent
(#not-kind-eq? @indent "compound_statement")
(#set! "scope" "all"))
+
+(parameter_list
+ . (parameter_declaration) @anchor
+ (#set! "scope" "tail")) @align