File tree 2 files changed +8
-7
lines changed
plugins/hls-stylish-haskell-plugin/src/Ide/Plugin
2 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -42,6 +42,11 @@ constraints:
42
42
-- in the future, thus: TODO: remove this flag.
43
43
bitvec -simd,
44
44
45
+ source-repository-package
46
+ type : git
47
+ location : https://github.com/jhrcek/stylish-haskell.git
48
+ tag : afefca07e7d1c6b10b1d71006192afcf49c4783b
49
+
45
50
if impl(ghc >= 9.9 )
46
51
-- https://github.com/haskell/haskell-language-server/issues/4324
47
52
benchmarks : False
Original file line number Diff line number Diff line change @@ -25,7 +25,6 @@ import Ide.PluginUtils
25
25
import Ide.Types hiding (Config )
26
26
import Language.Haskell.Stylish
27
27
import Language.LSP.Protocol.Types as LSP
28
- import System.Directory
29
28
import System.FilePath
30
29
31
30
data Log
@@ -78,12 +77,9 @@ provider recorder ide _token typ contents fp _opts = do
78
77
-- | Recursively search in every directory of the given filepath for .stylish-haskell.yaml.
79
78
-- If no such file has been found, return default config.
80
79
loadConfigFrom :: FilePath -> IO Config
81
- loadConfigFrom file = do
82
- currDir <- getCurrentDirectory
83
- setCurrentDirectory (takeDirectory file)
84
- config <- loadConfig (makeVerbose False ) Nothing
85
- setCurrentDirectory currDir
86
- pure config
80
+ loadConfigFrom file =
81
+ let configSearchStrategy = SearchFromDirectory (takeDirectory file)
82
+ in loadConfig (makeVerbose False ) configSearchStrategy
87
83
88
84
-- | Run stylish-haskell on the given text with the given configuration.
89
85
runStylishHaskell :: FilePath -- ^ Location of the file being formatted. Used for error message
You can’t perform that action at this time.
0 commit comments