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
32
32
, hls-plugin-api ^>= 1.3 || ^>= 1.4 || ^>= 1.5 || ^>= 1.6
33
33
, lens
34
34
, 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
38
36
, text
39
37
40
38
default-language : Haskell2010
Original file line number Diff line number Diff line change
1
+ {-# LANGUAGE CPP #-}
1
2
{-# LANGUAGE OverloadedStrings #-}
2
3
{-# LANGUAGE TypeApplications #-}
3
4
@@ -45,7 +46,11 @@ provider ideState typ contents fp _ = withIndefiniteProgress title Cancellable $
45
46
mkConf o region = defaultConfig { cfgDynOptions = o, cfgRegion = region }
46
47
fmt :: T. Text -> Config RegionIndices -> IO (Either OrmoluException T. Text )
47
48
fmt cont conf =
49
+ #if MIN_VERSION_ormolu(0,5,3)
50
+ try @ OrmoluException $ ormolu conf (fromNormalizedFilePath fp) cont
51
+ #else
48
52
try @ OrmoluException $ ormolu conf (fromNormalizedFilePath fp) $ T. unpack cont
53
+ #endif
49
54
50
55
case typ of
51
56
FormatText -> ret <$> fmt contents (mkConf fileOpts fullRegion)
You can’t perform that action at this time.
0 commit comments