@@ -38,7 +38,8 @@ import Language.LSP.Types
38
38
import qualified Language.LSP.Types as J
39
39
import Text.Regex.TDFA.Text ()
40
40
import UnliftIO (MonadUnliftIO )
41
- import UnliftIO.Async (forConcurrently )
41
+ import UnliftIO.Async (forConcurrently ,
42
+ mapConcurrently_ )
42
43
import UnliftIO.Exception (catchAny )
43
44
44
45
-- ---------------------------------------------------------------------
@@ -185,7 +186,8 @@ extensibleNotificationPlugins defaultConfig xs = Plugin mempty handlers
185
186
-- Just fs -> void $ runConcurrentlyNotification (show m) fs ide params
186
187
Just fs -> do
187
188
liftIO $ logInfo (ideLogger ide) $ " extensibleNotificationPlugins number of plugins:" <> T. pack (show (length fs))
188
- mapM_ (\ (_pid,f) -> f ide params) fs
189
+ -- run notification handlers in parallel
190
+ mapConcurrently_ (\ (_pid,f) -> f ide params) fs
189
191
190
192
-- ---------------------------------------------------------------------
191
193
@@ -211,7 +213,7 @@ newtype IdeHandler (m :: J.Method FromClient Request)
211
213
212
214
-- | Combine the 'PluginHandler' for all plugins
213
215
newtype IdeNotificationHandler (m :: J. Method FromClient Notification )
214
- = IdeNotificationHandler [(PluginId ,( IdeState -> MessageParams m -> LSP. LspM Config (NonEmpty () )))]
216
+ = IdeNotificationHandler [(PluginId , IdeState -> MessageParams m -> LSP. LspM Config (NonEmpty () ))]
215
217
-- type NotificationHandler (m :: Method FromClient Notification) = MessageParams m -> IO ()`
216
218
217
219
-- | Combine the 'PluginHandlers' for all plugins
0 commit comments