Closed ceastlund closed 4 years ago
I can see three points here:
Stdio.printf
indented too far
I just re-used the rule for (* {[
. I'll see if it can be adjusted.
Weird indentation of string literal
There is a special rule for strings starting with "\
, which are free-form. The issue goes away if you use e.g. "\n\
for opening instead (I digress, but putting \n\
at EOLs has my personal preference, OCaml allows you to prefix the lines with \
to preserve indentation, and ocp-index will handle it so it is visually consistent)
final comment over-indented
Seems that there is a lexing error remaining with (*$*)
, on it.
First point: I think the rule for (* {[
has the indentation it does because it's a double-nesting. (*$
is only one conceptual delimiter, so I'd hope for less indentation than (* {[
. This one isn't critical but it'd be nice to decrease the indentation.
Second point: Got it, working as intended then.
Third point: Great, looking forward to the fix!
1 and 3 should be fixed by 3ce84f2d009833883f908669a89a99c5274d01c3 :)
Using ocp-indent built from 03bb53f1a9db9e61b66e6674f995ec150619a68b, I get the following indentation:
The
Stdio.printf
does not need to be indented that far. I'd be fine with it being under the$
, for example. The lines of the string literal following it do not seem consistent with where it is indented.And the final
(*$*)
should not be indented at all. It seems that(*$*)
immediatelly following an expression is consistently indented farther than it needs to be.