File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
plugins/hls-stylish-haskell-plugin/src/Ide/Plugin Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -78,8 +78,12 @@ 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 =
82
- loadConfig (makeVerbose False ) (Just $ takeDirectory file)
81
+ loadConfigFrom file = do
82
+ currDir <- getCurrentDirectory
83
+ setCurrentDirectory (takeDirectory file)
84
+ config <- loadConfig (makeVerbose False ) Nothing
85
+ setCurrentDirectory currDir
86
+ pure config
83
87
84
88
-- | Run stylish-haskell on the given text with the given configuration.
85
89
runStylishHaskell :: FilePath -- ^ Location of the file being formatted. Used for error message
You can’t perform that action at this time.
0 commit comments