diff --git a/plugins/hls-pragmas-plugin/src/Ide/Plugin/Pragmas.hs b/plugins/hls-pragmas-plugin/src/Ide/Plugin/Pragmas.hs index c7ec0cda5f..7a6a62796c 100644 --- a/plugins/hls-pragmas-plugin/src/Ide/Plugin/Pragmas.hs +++ b/plugins/hls-pragmas-plugin/src/Ide/Plugin/Pragmas.hs @@ -214,7 +214,7 @@ completion _ide _ complParams = do let (J.TextDocumentIdentifier uri) = complParams ^. J.textDocument position = complParams ^. J.position contents <- LSP.getVirtualFile $ toNormalizedUri uri - fmap (Right . J.InL) $ case (undefined, uriToFilePath' undefined) of + fmap (Right . J.InL) $ case (contents, uriToFilePath' uri) of (Just cnts, Just _path) -> result <$> VFS.getCompletionPrefix position cnts where diff --git a/plugins/hls-pragmas-plugin/test/Main.hs b/plugins/hls-pragmas-plugin/test/Main.hs index 5d98888049..7229032a14 100644 --- a/plugins/hls-pragmas-plugin/test/Main.hs +++ b/plugins/hls-pragmas-plugin/test/Main.hs @@ -20,8 +20,8 @@ tests :: TestTree tests = testGroup "pragmas" [ codeActionTests - -- , codeActionTests' - -- , completionTests + , codeActionTests' + , completionTests ] codeActionTests :: TestTree @@ -125,7 +125,6 @@ completionTest testComment fileName te' label textFormat insertText detail [a, b item ^. L.insertTextFormat @?= textFormat item ^. L.insertText @?= insertText item ^. L.detail @?= detail -completionTest _ _ _ _ _ _ _ _ = undefined goldenWithPragmas :: TestName -> FilePath -> (TextDocumentIdentifier -> Session ()) -> TestTree goldenWithPragmas title path = goldenWithHaskellDoc pragmasPlugin title testDataDir path "expected" "hs"