|
1 | | -{-# LANGUAGE CPP #-} |
2 | 1 | {-# LANGUAGE DataKinds #-} |
3 | 2 | {-# LANGUAGE LambdaCase #-} |
4 | 3 | {-# LANGUAGE OverloadedLabels #-} |
@@ -99,16 +98,14 @@ provider recorder plId ideState token typ contents fp fo = ExceptT $ pluginWithI |
99 | 98 | errorMessage = "Failed to load " <> T.pack f <> ": " <> T.pack (show err) |
100 | 99 |
|
101 | 100 | let config = |
102 | | -#if MIN_VERSION_fourmolu(0,13,0) |
103 | | - refineConfig ModuleSource Nothing Nothing Nothing |
104 | | -#endif |
105 | | - defaultConfig |
106 | | - { cfgDynOptions = map DynOption fileOpts |
107 | | - , cfgFixityOverrides = cfgFileFixities |
108 | | - , cfgRegion = region |
109 | | - , cfgDebug = False |
110 | | - , cfgPrinterOpts = resolvePrinterOpts [lspPrinterOpts, cfgFilePrinterOpts] |
111 | | - } |
| 101 | + refineConfig ModuleSource Nothing Nothing Nothing $ |
| 102 | + defaultConfig |
| 103 | + { cfgDynOptions = map DynOption fileOpts |
| 104 | + , cfgFixityOverrides = cfgFileFixities |
| 105 | + , cfgRegion = region |
| 106 | + , cfgDebug = False |
| 107 | + , cfgPrinterOpts = resolvePrinterOpts [lspPrinterOpts, cfgFilePrinterOpts] |
| 108 | + } |
112 | 109 | ExceptT . liftIO $ |
113 | 110 | bimap (PluginInternalError . T.pack . show) (InL . makeDiffTextEdit contents) |
114 | 111 | <$> try @OrmoluException (ormolu config fp' contents) |
@@ -199,8 +196,3 @@ newtype CLIVersionInfo = CLIVersionInfo |
199 | 196 |
|
200 | 197 | mwhen :: Monoid a => Bool -> a -> a |
201 | 198 | mwhen b x = if b then x else mempty |
202 | | - |
203 | | -#if !MIN_VERSION_fourmolu(0,14,0) |
204 | | -resolvePrinterOpts :: [PrinterOptsPartial] -> PrinterOptsTotal |
205 | | -resolvePrinterOpts = foldr fillMissingPrinterOpts defaultPrinterOpts |
206 | | -#endif |
0 commit comments