File tree 1 file changed +3
-3
lines changed
plugins/hls-hlint-plugin/src/Ide/Plugin
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -268,16 +268,16 @@ getHlintSettingsRule usage =
268
268
-- ---------------------------------------------------------------------
269
269
270
270
codeActionProvider :: 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
272
272
where
273
-
274
273
getCodeActions = do
275
274
diags <- getDiagnostics ideState
276
275
let docNfp = toNormalizedFilePath' <$> uriToFilePath' (docId ^. LSP. uri)
277
276
numHintsInDoc = length
278
- [d | (nfp, _, d) <- diags
277
+ [d | (nfp, _, d@ LSP. Diagnostic {_range = range} ) <- diags
279
278
, validCommand d
280
279
, Just nfp == docNfp
280
+ , subRange range codeActionRange
281
281
]
282
282
-- We only want to show the applyAll code action if there is more than 1
283
283
-- hint in the current document
You can’t perform that action at this time.
0 commit comments