diff options
Diffstat (limited to 'vendor/queries/ocaml/indents.scm')
| -rw-r--r-- | vendor/queries/ocaml/indents.scm | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/vendor/queries/ocaml/indents.scm b/vendor/queries/ocaml/indents.scm new file mode 100644 index 00000000..6f4a13d9 --- /dev/null +++ b/vendor/queries/ocaml/indents.scm @@ -0,0 +1,27 @@ +; Vendored from helix (https://github.com/helix-editor/helix) at 278b24389: +; runtime/queries/ocaml/indents.scm. +; Licensed under the Mozilla Public License 2.0 (vendor/queries/helix.LICENSE, +; https://mozilla.org/MPL/2.0/). + +[ + (let_binding) + (type_binding) + (structure) + (signature) + (record_declaration) + (function_expression) + (fun_expression) + (match_case) + (then_clause) + (else_clause) +] @indent + +; `else if` chains nest else_clause -> if_expression -> else_clause, which would +; double-indent the trailing branch; `try`/`with` and explicit module `end` +; alignment are likewise left to the writer — see tests/indent/ocaml.ml. +[ + "}" + ")" + "]" + "end" +] @outdent |
