1 import Control.Applicative.Combinators
2 import Control.Monad.IO.Class
3 import Language.Haskell.LSP.Test
4 import Language.Haskell.LSP.Types
6 main = runSession "hie" fullCaps "../test/data/" $ do
7 docItem <- openDoc "Rename.hs" "haskell"
9 -- Use your favourite favourite combinators.
10 skipManyTill loggingNotification (count 2 publishDiagnosticsNotification)
12 -- Send requests and notifications and receive responses
13 let params = DocumentSymbolParams docItem
14 rsp <- request TextDocumentDocumentSymbol params :: Session DocumentSymbolsResponse
17 -- Or use one of the helper functions
18 getDocumentSymbols docItem >>= liftIO . print