X-Git-Url: https://git.lukelau.me/?p=lsp-test.git;a=blobdiff_plain;f=example%2FTest.hs;h=9d1fc0bd36eca2068de6cf8f2e08c854c9faa74f;hp=52ba45c821e64fb54b4d2ec72ad770b236a3a8c9;hb=84e2707604b3a64c00062104fa40e2ea76040155;hpb=8c79bbaf4135321c321b5599ada4a370e5dcb50d diff --git a/example/Test.hs b/example/Test.hs index 52ba45c..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" 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