File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
plugins/hls-fourmolu-plugin/src/Ide/Plugin Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -90,13 +90,14 @@ provider recorder plId ideState typ contents fp fo = ExceptT $ withIndefinitePro
90
90
, cfgDebug = False
91
91
, cfgPrinterOpts = resolvePrinterOpts [lspPrinterOpts, printerOpts]
92
92
}
93
- in liftIO (loadConfigFile fp') >>= \ case
93
+ cfg <-
94
+ liftIO (loadConfigFile fp') >>= \ case
94
95
ConfigLoaded file opts -> do
95
96
logWith recorder Info $ ConfigPath file
96
- mapExceptT liftIO $ format opts
97
+ pure opts
97
98
ConfigNotFound searchDirs -> do
98
99
logWith recorder Info $ NoConfigPath searchDirs
99
- mapExceptT liftIO $ format emptyConfig
100
+ pure emptyConfig
100
101
ConfigParseError f err -> do
101
102
lift $ sendNotification SMethod_WindowShowMessage $
102
103
ShowMessageParams
@@ -106,6 +107,8 @@ provider recorder plId ideState typ contents fp fo = ExceptT $ withIndefinitePro
106
107
throwError $ PluginInternalError errorMessage
107
108
where
108
109
errorMessage = " Failed to load " <> T. pack f <> " : " <> T. pack (show err)
110
+
111
+ mapExceptT liftIO $ format cfg
109
112
where
110
113
fp' = fromNormalizedFilePath fp
111
114
title = " Formatting " <> T. pack (takeFileName fp')
You can’t perform that action at this time.
0 commit comments