From 4a9d1163e04ba0fc29f8532afd35381b7df55e48 Mon Sep 17 00:00:00 2001 From: Blaž Hrastnik Date: Fri, 14 May 2021 19:21:46 +0900 Subject: Hacky way to specify indent scopes per language via toml configs. Can't do it via a scm query nicely because it returns an iterator over all the matches, whereas we want to traverse the tree ourselves. Can't extract the pattern data from a parsed query either. Oh well, toml files for now. --- runtime/queries/rust/indents.toml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 runtime/queries/rust/indents.toml (limited to 'runtime') diff --git a/runtime/queries/rust/indents.toml b/runtime/queries/rust/indents.toml new file mode 100644 index 00000000..49c2c15e --- /dev/null +++ b/runtime/queries/rust/indents.toml @@ -0,0 +1,30 @@ +indent = [ + "while_expression", + "for_expression", + "loop_expression", + "if_expression", + "if_let_expression", + "tuple_expression", + "array_expression", + "use_list", + "block", + "match_block", + "arguments", + "parameters", + "declaration_list", + "field_declaration_list", + "field_initializer_list", + "struct_pattern", + "tuple_pattern", + "enum_variant_list", + "binary_expression", + "field_expression", + "where_clause" +] + +outdent = [ + "where", + "}", + "]", + ")" +] -- cgit v1.2.3-70-g09d2