File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed
plugins/hls-stylish-haskell-plugin/src/Ide/Plugin Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -78,12 +78,8 @@ provider recorder ide _token typ contents fp _opts = do
78
78
-- | Recursively search in every directory of the given filepath for .stylish-haskell.yaml.
79
79
-- If no such file has been found, return default config.
80
80
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
81
+ loadConfigFrom file =
82
+ loadConfig (makeVerbose False ) (Just $ takeDirectory file)
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