Skip to content

Commit

Permalink
rename n to limit
Browse files Browse the repository at this point in the history
  • Loading branch information
pepeiborra committed Jan 24, 2021
1 parent 97eb2de commit a7189af
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ghcide/src/Development/IDE/Plugin/HLS.hs
Original file line number Diff line number Diff line change
Expand Up @@ -457,17 +457,17 @@ makeCompletions sps lf ideState params@(CompletionParams (TextDocumentIdentifier
IO [Either ResponseError CompletionResponseResult]
makeAction 0 _ = return []
makeAction _ [] = return []
makeAction n ((pid, p) : rest) = do
makeAction limit ((pid, p) : rest) = do
pluginConfig <- getPluginConfig lf pid
results <- if pluginEnabled pluginConfig plcCompletionOn
then otTracedProvider pid "completions" $ p lf ideState params
else return $ Right $ Completions $ List []
case results of
Right resp -> do
let (n', results') = consumeCompletionResponse n resp
(Right results' :) <$> makeAction n' rest
let (limit', results') = consumeCompletionResponse limit resp
(Right results' :) <$> makeAction limit' rest
Left err ->
(Left err :) <$> makeAction n rest
(Left err :) <$> makeAction limit rest

case mprefix of
Nothing -> return $ Right $ Completions $ List []
Expand Down

0 comments on commit a7189af

Please sign in to comment.