@@ -13,7 +13,6 @@ import Control.Exception
13
13
import Data.Either.Extra
14
14
import System.FilePath
15
15
16
- import Control.Lens ((^.) )
17
16
import qualified Data.Text as T
18
17
import Development.IDE as D
19
18
import qualified DynFlags as D
@@ -28,7 +27,6 @@ import Language.Haskell.LSP.Messages (FromServerMessage (ReqShowMessage))
28
27
import Ide.Types
29
28
import Language.Haskell.LSP.Core
30
29
import Language.Haskell.LSP.Types
31
- import Language.Haskell.LSP.Types.Lens
32
30
import "fourmolu" Ormolu
33
31
34
32
-- ---------------------------------------------------------------------
@@ -42,7 +40,7 @@ descriptor plId =
42
40
-- ---------------------------------------------------------------------
43
41
44
42
provider :: FormattingProvider IO
45
- provider lf ideState typ contents fp fo = withIndefiniteProgress lf title Cancellable $ do
43
+ provider lf ideState typ contents fp _ = withIndefiniteProgress lf title Cancellable $ do
46
44
ghc <- runAction " Fourmolu" ideState $ use GhcSession fp
47
45
fileOpts <- case hsc_dflags . hscEnv <$> ghc of
48
46
Nothing -> return []
@@ -59,7 +57,7 @@ provider lf ideState typ contents fp fo = withIndefiniteProgress lf title Cancel
59
57
, cfgDebug = True
60
58
, cfgPrinterOpts =
61
59
fillMissingPrinterOpts
62
- (lspPrinterOpts <> printerOpts)
60
+ printerOpts
63
61
defaultPrinterOpts
64
62
}
65
63
@@ -92,7 +90,6 @@ provider lf ideState typ contents fp fo = withIndefiniteProgress lf title Cancel
92
90
where
93
91
fp' = fromNormalizedFilePath fp
94
92
title = " Formatting " <> T. pack (takeFileName fp')
95
- lspPrinterOpts = mempty {poIndentation = Just $ fo ^. tabSize}
96
93
region = case typ of
97
94
FormatText ->
98
95
RegionIndices Nothing Nothing
0 commit comments