eclipse-lsp4j / lsp4j

A Java implementation of the language server protocol intended to be consumed by tools and language servers implemented in Java.
https://eclipse.org/lsp4j
Other
613 stars 145 forks source link

Debug completions not showing up in client #596

Closed borkdude closed 2 years ago

borkdude commented 2 years ago

In an LSP server I have this return value for completion of TextDocumentService. This is Clojure, but you probably get the idea:

(CompletableFuture/completedFuture
     (Either/forLeft
      [(org.eclipse.lsp4j.CompletionItem. "hello")]))

But unfortunately I don't see any completions in the client (VSCode). When I add some debugging, I do see that the function is running. When I change the return value to (CompletableFuture/completedFuture 1), this is obviously wrong, but I don't see an error anywhere. How could I go about debugging this?

borkdude commented 2 years ago

It turned out the completions were sent, but just not showing because non-matching prefixes.