@@ -13,7 +13,6 @@ import Control.Exception
1313import Data.Either.Extra
1414import System.FilePath
1515
16- import Control.Lens ((^.) )
1716import qualified Data.Text as T
1817import Development.IDE as D
1918import qualified DynFlags as D
@@ -28,7 +27,6 @@ import Language.Haskell.LSP.Messages (FromServerMessage (ReqShowMessage))
2827import Ide.Types
2928import Language.Haskell.LSP.Core
3029import Language.Haskell.LSP.Types
31- import Language.Haskell.LSP.Types.Lens
3230import "fourmolu" Ormolu
3331
3432-- ---------------------------------------------------------------------
@@ -42,7 +40,7 @@ descriptor plId =
4240-- ---------------------------------------------------------------------
4341
4442provider :: 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
4644 ghc <- runAction " Fourmolu" ideState $ use GhcSession fp
4745 fileOpts <- case hsc_dflags . hscEnv <$> ghc of
4846 Nothing -> return []
@@ -59,7 +57,7 @@ provider lf ideState typ contents fp fo = withIndefiniteProgress lf title Cancel
5957 , cfgDebug = True
6058 , cfgPrinterOpts =
6159 fillMissingPrinterOpts
62- (lspPrinterOpts <> printerOpts)
60+ printerOpts
6361 defaultPrinterOpts
6462 }
6563
@@ -92,7 +90,6 @@ provider lf ideState typ contents fp fo = withIndefiniteProgress lf title Cancel
9290 where
9391 fp' = fromNormalizedFilePath fp
9492 title = " Formatting " <> T. pack (takeFileName fp')
95- lspPrinterOpts = mempty {poIndentation = Just $ fo ^. tabSize}
9693 region = case typ of
9794 FormatText ->
9895 RegionIndices Nothing Nothing
0 commit comments