@@ -34,7 +34,6 @@ import Development.IDE.GHC.Compat as Compat hiding (Cpp, Warning,
3434import qualified Development.IDE.GHC.Compat.Util as S
3535import GHC.LanguageExtensions.Type (Extension (Cpp ))
3636import Ide.Plugin.Error
37- import Ide.Plugin.Fourmolu.Shim
3837import Ide.Plugin.Properties
3938import Ide.PluginUtils (makeDiffTextEdit )
4039import Ide.Types
@@ -43,6 +42,7 @@ import Language.LSP.Protocol.Message
4342import Language.LSP.Protocol.Types
4443import Language.LSP.Server hiding (defaultConfig )
4544import Ormolu
45+ import Ormolu.Config
4646import System.Exit
4747import System.FilePath
4848import 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')
0 commit comments