File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed
plugins/hls-ormolu-plugin/src/Ide/Plugin Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -35,21 +35,23 @@ import System.FilePath (takeFileName)
3535
3636-- ---------------------------------------------------------------------
3737
38- descriptor :: PluginId -> PluginDescriptor IdeState
39- descriptor plId = (defaultPluginDescriptor plId)
40- { pluginHandlers = mkFormattingHandlers provider
38+ descriptor :: Recorder ( WithPriority T. Text ) -> PluginId -> PluginDescriptor IdeState
39+ descriptor recorder plId = (defaultPluginDescriptor plId)
40+ { pluginHandlers = mkFormattingHandlers $ provider recorder
4141 }
4242
4343-- ---------------------------------------------------------------------
4444
45- provider :: FormattingHandler IdeState
46- provider ideState typ contents fp _ = ExceptT $ withIndefiniteProgress title Cancellable $ runExceptT $ do
45+ provider :: Recorder ( WithPriority T. Text ) -> FormattingHandler IdeState
46+ provider recorder ideState typ contents fp _ = ExceptT $ withIndefiniteProgress title Cancellable $ runExceptT $ do
4747 ghc <- liftIO $ runAction " Ormolu" ideState $ use GhcSession fp
4848 let df = hsc_dflags . hscEnv <$> ghc
4949 fileOpts <- case df of
5050 Nothing -> pure []
5151 Just df -> pure $ fromDyn df
5252
53+ logWith recorder Debug $ " Using ormolu-" <> VERSION_ormolu
54+
5355 let
5456 fullRegion = RegionIndices Nothing Nothing
5557 rangeRegion s e = RegionIndices (Just $ s + 1 ) (Just $ e + 1 )
Original file line number Diff line number Diff line change @@ -169,7 +169,7 @@ idePlugins recorder = pluginDescToIdePlugins allPlugins
169169 let pId = " tactics" in Tactic. descriptor (pluginRecorder pId) pId:
170170#endif
171171#if hls_ormolu
172- Ormolu. descriptor " ormolu" :
172+ let pId = " ormolu" in Ormolu. descriptor (pluginRecorder pId) pId :
173173#endif
174174#if hls_stylishHaskell
175175 StylishHaskell. descriptor " stylish-haskell" :
You can’t perform that action at this time.
0 commit comments