Skip to content

Commit e24ebd2

Browse files
committed
Use hint name for code action title
1 parent 55dfc3b commit e24ebd2

File tree

1 file changed

+1
-2
lines changed
  • plugins/hls-hlint-plugin/src/Ide/Plugin

1 file changed

+1
-2
lines changed

plugins/hls-hlint-plugin/src/Ide/Plugin/Hlint.hs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ codeActionProvider _lf ideState plId docId _ context = Right . LSP.List . map CA
250250
Just . codeAction <$> mkLspCommand plId "applyOne" title (Just args)
251251
where
252252
codeAction cmd = LSP.CodeAction title (Just LSP.CodeActionQuickFix) (Just (LSP.List [diag])) Nothing (Just cmd)
253-
title = "Apply hint:" <> head (T.lines m)
253+
title = "Apply hint: " <> code
254254
-- need 'file', 'start_pos' and hint title (to distinguish between alternative suggestions at the same location)
255255
args = [toJSON (AOP (docId ^. LSP.uri) start code)]
256256
mkHlintAction (LSP.Diagnostic _r _s _c _source _m _ _) = return Nothing
@@ -371,4 +371,3 @@ writeFileUTF8NoNewLineTranslation file txt =
371371
hSetEncoding h utf8
372372
hSetNewlineMode h noNewlineTranslation
373373
hPutStr h (T.unpack txt)
374-

0 commit comments

Comments
 (0)