File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -766,6 +766,10 @@ dedenting."
766766 (open-bracket-pos (fsharp-nesting-level)))
767767
768768 (cond
769+ ((and open-bracket-pos (eq (and (looking-back " [[:space:]\n\r ]+" nil t )
770+ (match-beginning 0 ))
771+ (1+ open-bracket-pos)))
772+ fsharp-indent-offset)
769773 ; ; Continuation Lines
770774 ((fsharp-continuation-line-p)
771775 (if open-bracket-pos
Original file line number Diff line number Diff line change 271271 (should (eq (fsharp--compute-indentation-relative-to-previous t ) 4 ))
272272 (should (eq (fsharp--compute-indentation-relative-to-previous t )
273273 (fsharp-compute-indentation t ))))))
274+
275+ (describe " The `fsharp-compute-indentation' "
276+ :var ((file (concat fsharp-struct-test-files-dir " BracketIndent.fs" )))
277+ (it " indents on the first line after opening bracket"
278+ (with-current-buffer (find-file-noselect file)
279+ (goto-char (point-min ))
280+ (search-forward-regexp " let formatTwo = \\ [\n " )
281+ (should (eq (fsharp-compute-indentation t ) fsharp-indent-offset)))))
You can’t perform that action at this time.
0 commit comments