Skip to content

Commit 3d9f9a2

Browse files
committed
Support Fourmolu 0.7 in CLI mode
Fourmolu 0.7 (due to Ormolu 0.5) removes the `--cabal-default-extensions` flag, instead looking for Cabal files by default. If input is taken from stdin and `--stdin-input-file` isn't specified, it therefore fails. We don't need to make any changes in non-CLI mode because the Cabal file handling logic occurs at a higher level outside the entry point we use to the library (the `ormolu` function).
1 parent bb6b4e1 commit 3d9f9a2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

plugins/hls-fourmolu-plugin/src/Ide/Plugin/Fourmolu.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ provider plId ideState typ contents fp fo = withIndefiniteProgress title Cancell
6666
(exitCode, out, err) <-
6767
readCreateProcessWithExitCode
6868
( proc "fourmolu" $
69-
["-d"]
69+
["-d", "--no-cabal"]
7070
<> catMaybes
7171
[ ("--start-line=" <>) . show <$> regionStartLine region
7272
, ("--end-line=" <>) . show <$> regionEndLine region

0 commit comments

Comments
 (0)