From 679e0ecc03325b8ff65348f2cfb02ae6c1fdc2b6 Mon Sep 17 00:00:00 2001 From: shaurya gupta Date: Thu, 30 Jul 2020 17:19:33 +0530 Subject: [PATCH] Don't normalize in ormolu --- src/Ide/Plugin/Ormolu.hs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/Ide/Plugin/Ormolu.hs b/src/Ide/Plugin/Ormolu.hs index aa337fbc8..8fb571af4 100644 --- a/src/Ide/Plugin/Ormolu.hs +++ b/src/Ide/Plugin/Ormolu.hs @@ -65,11 +65,8 @@ provider _lf ideState typ contents fp _ = do case typ of FormatText -> ret <$> fmt contents (mkConf fileOpts fullRegion) - FormatRange r -> - let - Range (Position sl _) (Position el _) = normalize r - in - ret <$> fmt contents (mkConf fileOpts (rangeRegion sl el)) + FormatRange (Range (Position sl _) (Position el _)) -> + ret <$> fmt contents (mkConf fileOpts (rangeRegion sl el)) where ret :: Either OrmoluException T.Text -> Either ResponseError (List TextEdit) ret (Left err) = Left