X-Git-Url: https://git.lukelau.me/?a=blobdiff_plain;f=example%2FTest.hs;h=52ba45c821e64fb54b4d2ec72ad770b236a3a8c9;hb=HEAD;hp=0f5cdb46fea65960e8978677fb0d702cb30ae5e5;hpb=fdef0cfe8916eb2e97ca0b5ae1c85e783b1c9172;p=lsp-test.git diff --git a/example/Test.hs b/example/Test.hs index 0f5cdb4..5e28094 100644 --- a/example/Test.hs +++ b/example/Test.hs @@ -1,19 +1,19 @@ import Control.Applicative.Combinators import Control.Monad.IO.Class -import Language.Haskell.LSP.Test -import Language.Haskell.LSP.Types +import Language.LSP.Test +import Language.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