From: Luke Lau Date: Fri, 8 Jun 2018 20:43:02 +0000 (-0400) Subject: Update README.md X-Git-Tag: 0.1.0.0~81 X-Git-Url: https://git.lukelau.me/?p=lsp-test.git;a=commitdiff_plain;h=2fc7db80e8ec7bf37e1022b2e28c098eb390167c Update README.md --- diff --git a/README.md b/README.md index e58ae17..f866ccf 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,15 @@ # haskell-lsp-test [![Build Status](https://travis-ci.com/Bubba/haskell-lsp-test.svg?branch=master)](https://travis-ci.com/Bubba/haskell-lsp-test) This is the functional testing framework for [haskell-ide-engine](https://github.com/haskell/haskell-ide-engine), and potentially any other Language Server Protocol server. + +```haskell +runSession "session/root/dir" $ do + doc <- openDoc "foo.hs" "haskell" + + skipMany notification + + sendRequest (Proxy :: Proxy DocumentSymbolRequest) + TextDocumentDocumentSymbol + (DocumentSymbolParams doc) + + RspDocumentSymbols rspSymbols <- response + let (List symbols) = fromJust (rspSymbols ^. result)