Fix getTypeDefinitions
[lsp-test.git] / test / dummy-server / Main.hs
index aa73677eb061e8be697723286469b36692d20d1d..ab917e8fa50ff825b35b996f78fd94fb80ad96b6 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) (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