File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
plugins/hls-hlint-plugin/src/Ide/Plugin Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -268,16 +268,16 @@ getHlintSettingsRule usage =
268268-- ---------------------------------------------------------------------
269269
270270codeActionProvider :: PluginMethodHandler IdeState TextDocumentCodeAction
271- codeActionProvider ideState plId (CodeActionParams _ _ docId _ context) = Right . LSP. List . map InR <$> liftIO getCodeActions
271+ codeActionProvider ideState plId (CodeActionParams _ _ docId codeActionRange context) = Right . LSP. List . map InR <$> liftIO getCodeActions
272272 where
273-
274273 getCodeActions = do
275274 diags <- getDiagnostics ideState
276275 let docNfp = toNormalizedFilePath' <$> uriToFilePath' (docId ^. LSP. uri)
277276 numHintsInDoc = length
278- [d | (nfp, _, d) <- diags
277+ [d | (nfp, _, d@ LSP. Diagnostic {_range = range} ) <- diags
279278 , validCommand d
280279 , Just nfp == docNfp
280+ , subRange codeActionRange range
281281 ]
282282 -- We only want to show the applyAll code action if there is more than 1
283283 -- hint in the current document
You can’t perform that action at this time.
0 commit comments