Change server filepath to a command to run
[lsp-test.git] / example / Main.hs
index 5aaa2d13abee6adb516dcfece381e3cd215d1e50..29795fa22e52b76279d1ae98eca5c5f111eb72cd 100644 (file)
@@ -4,14 +4,15 @@ import Data.Proxy
 
 import Control.Monad.IO.Class
 
-main = runSession "test/recordings/renamePass" $ do
+main = runSession "hie --lsp" "test/recordings/renamePass" $ do
 
   docItem <- getDocItem "Desktop/simple.hs" "haskell"
   docId <- TextDocumentIdentifier <$> getDocUri "Desktop/simple.hs"
 
   sendNotification TextDocumentDidOpen (DidOpenTextDocumentParams docItem)
   
-  sendRequest (Proxy :: Proxy DocumentSymbolRequest) TextDocumentDocumentSymbol (DocumentSymbolParams docId)
+  sendRequest TextDocumentDocumentSymbol (DocumentSymbolParams docId)
 
-  syms <- getMessage :: Session DocumentSymbolsResponse
-  liftIO $ print syms
\ No newline at end of file
+  skipMany loggingNotification
+
+  anyResponse >>= liftIO . print