X-Git-Url: http://git.lukelau.me/?p=lsp-test.git;a=blobdiff_plain;f=README.md;h=0af386e54c3a75c8be2f2af3af767ff6fb2693ce;hp=e58ae1734dc2a46658aefe80dc9aa4cf888945e5;hb=e2ae28cd825653b0cb8b982d113497e9ac795059;hpb=c449df9656ffb46d60ea5aba8537e5c10e02d388 diff --git a/README.md b/README.md index e58ae17..0af386e 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,14 @@ # 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 TextDocumentDocumentSymbol (DocumentSymbolParams doc) + + rspSymbols <- response :: DocumentSymbolsResponse + let (List symbols) = fromJust (rspSymbols ^. result) +```