0

I have an independently written LSP-compliant language server for a custom language and an Xtext framework for that language, as Eclipse plugins. The two work fine independently; the LSP is connected in using LSP4E.

But when I try to connect the Language Server into a project in which Xtext is providing syntax coloring and some parsing checking, it appears that the language server is never started and certainly is not providing the error messages to the Eclipse UI that it does when used by itself. I'm not asking Xtext to create a language server itself.

The goal is to use (and not reimplement) the LS for parsing and type checking and language-aware code navigation, while using Xtext for syntax coloring.

Can anyone point me to a successful use of these two technologies together? or know that they cannot (yet?) be?

Edit: To the comment about checking whether the LS is working. As far as I can tell, the LS is not even started, though it started fine when used alone. Somehow putting Xtexxt into the mix has usurped the connection to the LS or changed it in a way that the launching and use no longer happens.

The LSP4J version installed is (only) Eclipse LSP4J org.eclipse.lsp4j 0.15.0.v20220805-0131 org.eclipse.lsp4j

Xtext's components vary, but basically Eclipse Xtext Xtext 2.28.0.v20220829-0438 org.eclipse.xtext

David Cok
  • 1
  • 1
  • are the lsp4j versions in lsp4e and xtext matching? if yes: do you use plugin.xml to register to lsp4e or launch config. if the latter you might have stumbled over https://github.com/eclipse/lsp4e/issues/239 – Christian Dietrich Sep 30 '22 at 07:56
  • First I'd try to make sure that the LS is actually working (perhaps by checking the LS output log or console). If it is actually working, perhaps the issue is lsp4e as described in the previous comment. – Alejandro González Oct 05 '22 at 12:09
  • does it work if you start the ServerLauncher manually (run as java application), does it throw any exception? – Christian Dietrich Oct 07 '22 at 13:02
  • which lsp4e version do you use? did you try latest snapshot which should have fix for bug above https://download.eclipse.org/lsp4e/snapshots/ – Christian Dietrich Oct 07 '22 at 13:09

0 Answers0