Skip to content

Commit a20ffc6

Browse files
Require fourmolu >= 0.9
1 parent ee105ee commit a20ffc6

File tree

3 files changed

+4
-80
lines changed

3 files changed

+4
-80
lines changed

plugins/hls-fourmolu-plugin/hls-fourmolu-plugin.cabal

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,12 @@ library
2626
buildable: True
2727
exposed-modules:
2828
Ide.Plugin.Fourmolu
29-
, Ide.Plugin.Fourmolu.Shim
3029
hs-source-dirs: src
3130
ghc-options: -Wall
3231
build-depends:
3332
, base >=4.12 && <5
3433
, filepath
35-
, fourmolu ^>=0.3 || ^>=0.4 || ^>= 0.6 || ^>= 0.7 || ^>= 0.8 || ^>= 0.9 || ^>= 0.10 || ^>= 0.11 || ^>= 0.12 || ^>= 0.13
34+
, fourmolu ^>= 0.9 || ^>= 0.10 || ^>= 0.11 || ^>= 0.12 || ^>= 0.13
3635
, ghc
3736
, ghc-boot-th
3837
, ghcide == 2.1.0.0

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ import Development.IDE.GHC.Compat as Compat hiding (Cpp, Warning,
3434
import qualified Development.IDE.GHC.Compat.Util as S
3535
import GHC.LanguageExtensions.Type (Extension (Cpp))
3636
import Ide.Plugin.Error
37-
import Ide.Plugin.Fourmolu.Shim
3837
import Ide.Plugin.Properties
3938
import Ide.PluginUtils (makeDiffTextEdit)
4039
import Ide.Types
@@ -43,6 +42,7 @@ import Language.LSP.Protocol.Message
4342
import Language.LSP.Protocol.Types
4443
import Language.LSP.Server hiding (defaultConfig)
4544
import Ormolu
45+
import Ormolu.Config
4646
import System.Exit
4747
import System.FilePath
4848
import System.Process.Run (cwd, proc)
@@ -87,9 +87,9 @@ provider recorder plId ideState typ contents fp fo = ExceptT $ withIndefinitePro
8787
where
8888
printerOpts = cfgFilePrinterOpts fourmoluConfig
8989
config =
90-
addFixityOverrides (cfgFileFixities fourmoluConfig) $
9190
defaultConfig
9291
{ cfgDynOptions = map DynOption fileOpts
92+
, cfgFixityOverrides = cfgFileFixities fourmoluConfig
9393
, cfgRegion = region
9494
, cfgDebug = False
9595
, cfgPrinterOpts =
@@ -112,7 +112,7 @@ provider recorder plId ideState typ contents fp fo = ExceptT $ withIndefinitePro
112112
}
113113
throwError $ PluginInternalError errorMessage
114114
where
115-
errorMessage = "Failed to load " <> T.pack f <> ": " <> T.pack (showParseError err)
115+
errorMessage = "Failed to load " <> T.pack f <> ": " <> T.pack (show err)
116116
where
117117
fp' = fromNormalizedFilePath fp
118118
title = "Formatting " <> T.pack (takeFileName fp')

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

Lines changed: 0 additions & 75 deletions
This file was deleted.

0 commit comments

Comments
 (0)