X-Git-Url: https://git.lukelau.me/?a=blobdiff_plain;f=example%2FTest.hs;h=9d1fc0bd36eca2068de6cf8f2e08c854c9faa74f;hb=84e2707604b3a64c00062104fa40e2ea76040155;hp=0f5cdb46fea65960e8978677fb0d702cb30ae5e5;hpb=fdef0cfe8916eb2e97ca0b5ae1c85e783b1c9172;p=lsp-test.git diff --git a/example/Test.hs b/example/Test.hs index 0f5cdb4..9d1fc0b 100644 --- a/example/Test.hs +++ b/example/Test.hs @@ -3,17 +3,17 @@ import Control.Monad.IO.Class import Language.Haskell.LSP.Test import Language.Haskell.LSP.Types -main = runSession "hie --lsp" fullCaps "../test/data/" $ do - docItem <- openDoc "Rename.hs" "haskell" +main = runSession "haskell-language-server" fullCaps "../test/data/" $ do + doc <- openDoc "Rename.hs" "haskell" -- Use your favourite favourite combinators. skipManyTill loggingNotification (count 2 publishDiagnosticsNotification) -- Send requests and notifications and receive responses - let params = DocumentSymbolParams docItem - rsp <- request TextDocumentDocumentSymbol params :: Session DocumentSymbolsResponse + rsp <- request STextDocumentDocumentSymbol $ + DocumentSymbolParams Nothing Nothing doc liftIO $ print rsp -- Or use one of the helper functions - getDocumentSymbols docItem >>= liftIO . print + getDocumentSymbols doc >>= liftIO . print