File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
plugins/hls-ormolu-plugin Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -32,9 +32,7 @@ library
3232 , hls-plugin-api ^>= 1.3 || ^>= 1.4 || ^>= 1.5 || ^>= 1.6
3333 , lens
3434 , lsp
35- -- we are incompatible with 0.5.3.
36- -- See upstream ticket: https://github.com/tweag/ormolu/issues/981
37- , ormolu ^>= 0.1.2 || ^>= 0.2 || ^>= 0.3 || (>= 0.5 && < 0.5.3 )
35+ , ormolu ^>= 0.1.2 || ^>= 0.2 || ^>= 0.3 || ^>= 0.5
3836 , text
3937
4038 default-language : Haskell2010
Original file line number Diff line number Diff line change 1+ {-# LANGUAGE CPP #-}
12{-# LANGUAGE OverloadedStrings #-}
23{-# LANGUAGE TypeApplications #-}
34
@@ -45,7 +46,11 @@ provider ideState typ contents fp _ = withIndefiniteProgress title Cancellable $
4546 mkConf o region = defaultConfig { cfgDynOptions = o, cfgRegion = region }
4647 fmt :: T. Text -> Config RegionIndices -> IO (Either OrmoluException T. Text )
4748 fmt cont conf =
49+ #if MIN_VERSION_ormolu(0,5,3)
50+ try @ OrmoluException $ ormolu conf (fromNormalizedFilePath fp) cont
51+ #else
4852 try @ OrmoluException $ ormolu conf (fromNormalizedFilePath fp) $ T. unpack cont
53+ #endif
4954
5055 case typ of
5156 FormatText -> ret <$> fmt contents (mkConf fileOpts fullRegion)
You can’t perform that action at this time.
0 commit comments