From e1c97e9b4e6d769eea34e98109643a9936123e51 Mon Sep 17 00:00:00 2001 From: Alan Zimmerman Date: Wed, 1 Jan 2020 21:37:25 +0000 Subject: [PATCH] Return hlint code actions as type 'quickfix' --- src/Haskell/Ide/Engine/Plugin/ApplyRefact.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Haskell/Ide/Engine/Plugin/ApplyRefact.hs b/src/Haskell/Ide/Engine/Plugin/ApplyRefact.hs index 884bbca38..72ad9859c 100644 --- a/src/Haskell/Ide/Engine/Plugin/ApplyRefact.hs +++ b/src/Haskell/Ide/Engine/Plugin/ApplyRefact.hs @@ -325,7 +325,7 @@ codeActionProvider plId docId _ context = IdeResultOk <$> hlintActions mkHlintAction diag@(LSP.Diagnostic (LSP.Range start _) _s (Just (LSP.StringValue code)) (Just "hlint") m _) = Just . codeAction <$> mkLspCommand plId "applyOne" title (Just args) where - codeAction cmd = LSP.CodeAction title (Just LSP.CodeActionRefactor) (Just (LSP.List [diag])) Nothing (Just cmd) + codeAction cmd = LSP.CodeAction title (Just LSP.CodeActionQuickFix) (Just (LSP.List [diag])) Nothing (Just cmd) title = "Apply hint:" <> head (T.lines m) -- need 'file', 'start_pos' and hint title (to distinguish between alternative suggestions at the same location) args = [toJSON (AOP (docId ^. LSP.uri) start code)]