aboutsummaryrefslogtreecommitdiff
path: root/runtime/queries/c/indents.toml
diff options
context:
space:
mode:
authorSebastian Neubauer2022-01-04 01:53:04 +0000
committerGitHub2022-01-04 01:53:04 +0000
commit5b1a628e81b7d2f198ef401d442ca7967c5a0135 (patch)
tree380f8a9f0b61d2c5945496458821c73ec285de98 /runtime/queries/c/indents.toml
parent641255ccc83648d164bf6e8e8e4e93460591830b (diff)
Add textobjects and indents to c and cpp (#1293)
Indentation of single line statements doesn't work, i.e. for (;;)<hit enter> leads to for(;;) <cursor here> Only blocks with curly braces are indented.
Diffstat (limited to 'runtime/queries/c/indents.toml')
-rw-r--r--runtime/queries/c/indents.toml16
1 files changed, 16 insertions, 0 deletions
diff --git a/runtime/queries/c/indents.toml b/runtime/queries/c/indents.toml
new file mode 100644
index 00000000..f4076e17
--- /dev/null
+++ b/runtime/queries/c/indents.toml
@@ -0,0 +1,16 @@
+indent = [
+ "compound_statement",
+ "field_declaration_list",
+ "enumerator_list",
+ "parameter_list",
+ "init_declarator",
+ "case_statement",
+ "condition_clause",
+ "expression_statement",
+]
+
+outdent = [
+ "case",
+ "}",
+ "]",
+]