X-Git-Url: http://git.lukelau.me/?a=blobdiff_plain;f=example%2FMain.hs;h=cc74026531ead6183d384d9113fd001a8f60e510;hb=d8e460543b7cbc32550bed20d20ef4b13d6705a5;hp=0c8ae9ff821618ee85f198decd3170e199e391ed;hpb=4eb97ef8a3d4b3908fa9b5bbbd5ae77cfa95cecc;p=lsp-test.git diff --git a/example/Main.hs b/example/Main.hs index 0c8ae9f..cc74026 100644 --- a/example/Main.hs +++ b/example/Main.hs @@ -1,18 +1,14 @@ import Language.Haskell.LSP.Test import Language.Haskell.LSP.TH.DataTypesJSON -import Data.Proxy import Control.Monad.IO.Class -main = runSession "hie" "test/recordings/renamePass" $ do +main = runSession "hie --lsp" "test/recordings/renamePass" $ do + docItem <- openDoc "Desktop/simple.hs" "haskell" - docItem <- getDocItem "Desktop/simple.hs" "haskell" - docId <- TextDocumentIdentifier <$> getDocUri "Desktop/simple.hs" - - sendNotification TextDocumentDidOpen (DidOpenTextDocumentParams docItem) - - sendRequest (Proxy :: Proxy DocumentSymbolRequest) TextDocumentDocumentSymbol (DocumentSymbolParams docId) + let params = DocumentSymbolParams docItem + _ <- sendRequest TextDocumentDocumentSymbol params :: Session DocumentSymbolsResponse skipMany loggingNotification - response >>= liftIO . print + anyResponse >>= liftIO . print