Skip to content

Commit 35c0365

Browse files
committed
Evaluate all HLS providers concurrently
1 parent ed1dc68 commit 35c0365

File tree

1 file changed

+5
-5
lines changed
  • ghcide/src/Development/IDE/Plugin

1 file changed

+5
-5
lines changed

ghcide/src/Development/IDE/Plugin/HLS.hs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ makeCodeAction cas lf ideState (CodeActionParams docId range context _) = do
9999
if pluginEnabled pluginConfig plcCodeActionsOn
100100
then otTracedProvider pid "codeAction" $ provider lf ideState pid docId range context
101101
else return $ Right (List [])
102-
r <- mapM makeAction cas
102+
r <- mapConcurrently makeAction cas
103103
let actions = filter wasRequested . foldMap unL $ rights r
104104
res <- send caps actions
105105
return $ Right res
@@ -173,7 +173,7 @@ makeCodeLens cas lf ideState params = do
173173
doOneRight (pid, Right a) = [(pid,a)]
174174
doOneRight (_, Left _) = []
175175

176-
r <- mapM makeLens cas
176+
r <- mapConcurrently makeLens cas
177177
case breakdown r of
178178
([],[]) -> return $ Right $ List []
179179
(es,[]) -> return $ Left $ ResponseError InternalError (T.pack $ "codeLens failed:" ++ show es) Nothing
@@ -308,7 +308,7 @@ makeHover hps lf ideState params
308308
if pluginEnabled pluginConfig plcHoverOn
309309
then otTracedProvider pid "hover" $ p ideState params
310310
else return $ Right Nothing
311-
mhs <- mapM makeHover hps
311+
mhs <- mapConcurrently makeHover hps
312312
-- TODO: We should support ServerCapabilities and declare that
313313
-- we don't support hover requests during initialization if we
314314
-- don't have any hover providers
@@ -363,7 +363,7 @@ makeSymbols sps lf ideState params
363363
if pluginEnabled pluginConfig plcSymbolsOn
364364
then otTracedProvider pid "symbols" $ p lf ideState params
365365
else return $ Right []
366-
mhs <- mapM makeSymbols sps
366+
mhs <- mapConcurrently makeSymbols sps
367367
case rights mhs of
368368
[] -> return $ Left $ responseError $ T.pack $ show $ lefts mhs
369369
hs -> return $ Right $ convertSymbols $ concat hs
@@ -393,7 +393,7 @@ renameWith providers lspFuncs state params = do
393393
then otTracedProvider pid "rename" $ p lspFuncs state params
394394
else return $ Right $ WorkspaceEdit Nothing Nothing
395395
-- TODO:AZ: we need to consider the right way to combine possible renamers
396-
results <- mapM makeAction providers
396+
results <- mapConcurrently makeAction providers
397397
case partitionEithers results of
398398
(errors, []) -> return $ Left $ responseError $ T.pack $ show errors
399399
(_, edits) -> return $ Right $ mconcat edits

0 commit comments

Comments
 (0)