File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
plugins/hls-hlint-plugin/src/Ide/Plugin Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -119,7 +119,7 @@ rules = do
119
119
LSP. Diagnostic {
120
120
_range = srcSpanToRange $ ideaSpan idea
121
121
, _severity = Just LSP. DsInfo
122
- , _code = Just $ (LSP. StringValue $ T. pack $ codePre ++ ideaHint idea)
122
+ , _code = Just (LSP. StringValue $ T. pack $ codePre ++ ideaHint idea)
123
123
, _source = Just " hlint"
124
124
, _message = T. pack $ show idea
125
125
, _relatedInformation = Nothing
@@ -265,9 +265,10 @@ codeActionProvider _lf ideState plId docId _ context = Right . LSP.List . map CA
265
265
Just . codeAction <$> mkLspCommand plId " applyOne" title (Just args)
266
266
where
267
267
codeAction cmd = LSP. CodeAction title (Just LSP. CodeActionQuickFix ) (Just (LSP. List [diag])) Nothing (Just cmd)
268
- title = T. replace " refact:" " Apply hint: " code
268
+ ideaHint = T. replace " refact:" " " code
269
+ title = " Apply hint: " <> ideaHint
269
270
-- need 'file', 'start_pos' and hint title (to distinguish between alternative suggestions at the same location)
270
- args = [toJSON (AOP (docId ^. LSP. uri) start code )]
271
+ args = [toJSON (AOP (docId ^. LSP. uri) start ideaHint )]
271
272
mkHlintAction (LSP. Diagnostic _r _s _c _source _m _ _) = return Nothing
272
273
273
274
-- ---------------------------------------------------------------------
You can’t perform that action at this time.
0 commit comments