Bump haskell-lsp bounds
[lsp-test.git] / test / dummy-server / Main.hs
index aa73677eb061e8be697723286469b36692d20d1d..f0819d84c3535aadb75500f05e38c6d1b06ae4b0 100644 (file)
@@ -109,6 +109,13 @@ handlers lfvar = def
       send $ RspCodeAction $ makeResponseMessage req caresults
   , didChangeWatchedFilesNotificationHandler = pure $ \_ ->
       send $ NotLogMessage $ fmServerLogMessageNotification MtLog "got workspace/didChangeWatchedFiles"
+  , completionHandler = pure $ \req -> do
+      let res = CompletionList (CompletionListType False (List [item]))
+          item =
+            CompletionItem "foo" (Just CiConstant) (Just (List [])) Nothing
+            Nothing Nothing Nothing Nothing Nothing Nothing Nothing
+            Nothing Nothing Nothing Nothing Nothing
+      send $ RspCompletion $ makeResponseMessage req res
   }
   where send msg = readMVar lfvar >>= \lf -> (sendFunc lf) msg