X-Git-Url: http://git.lukelau.me/?p=lsp-test.git;a=blobdiff_plain;f=test%2Fdummy-server%2FMain.hs;h=ab917e8fa50ff825b35b996f78fd94fb80ad96b6;hp=aa73677eb061e8be697723286469b36692d20d1d;hb=72257c6a7b5461c529c415b93e1c3507e1c843a7;hpb=2f0ce0270e1d164b4b7c8c45d4d0e92564086e39 diff --git a/test/dummy-server/Main.hs b/test/dummy-server/Main.hs index aa73677..ab917e8 100644 --- a/test/dummy-server/Main.hs +++ b/test/dummy-server/Main.hs @@ -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