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."
766
766
(open-bracket-pos (fsharp-nesting-level)))
767
767
768
768
(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)
769
773
; ; Continuation Lines
770
774
((fsharp-continuation-line-p)
771
775
(if open-bracket-pos
Original file line number Diff line number Diff line change 271
271
(should (eq (fsharp--compute-indentation-relative-to-previous t ) 4 ))
272
272
(should (eq (fsharp--compute-indentation-relative-to-previous t )
273
273
(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