From 5b1a628e81b7d2f198ef401d442ca7967c5a0135 Mon Sep 17 00:00:00 2001 From: Sebastian Neubauer Date: Tue, 4 Jan 2022 02:53:04 +0100 Subject: Add textobjects and indents to c and cpp (#1293) Indentation of single line statements doesn't work, i.e. for (;;) leads to for(;;) Only blocks with curly braces are indented.--- runtime/queries/c/indents.toml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 runtime/queries/c/indents.toml (limited to 'runtime/queries/c/indents.toml') 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", + "}", + "]", +] -- cgit v1.2.3-70-g09d2