Skip to main content



      Home
Home » Modeling » TMF (Xtext) » Xtext LSP, Client with separate server process(Need help in getting the basic Xtext LSP example to work)
Xtext LSP, Client with separate server process [message #1840560] Mon, 19 April 2021 07:37 Go to next message
Eclipse UserFriend
Hi,

I am not able to get the very basic Xtext LSP example to work. I see two problems - 1) Content assist not showing the keyword proposal, and 2) Validation not working.

I am running the server as a separate process. The links to the project [0], RunWebSocketServer [1], and the VS Code [3] extension are provided below.

[0] https://github.com/nbhusare/Xbase-sandbox/tree/master/lsp
[1] https://github.com/nbhusare/Xbase-sandbox/blob/master/lsp/org.xtext.example.mydsl.ide/bin/main/org/xtext/example/mydsl/ide/RunWebSocketServer.xtend
[2] https://github.com/nbhusare/Xbase-sandbox/tree/master/lsp/vscode-ext/hellolsp

I have compared my code with the xtext-example-project and other xtext-LSP projects on Github. I have also searched through the Xtext forum in the hope to get some hints, but so far I haven't had much luck.

Kindly help.
Re: Xtext LSP, Client with separate server process [message #1840562 is a reply to message #1840560] Mon, 19 April 2021 07:46 Go to previous messageGo to next message
Eclipse UserFriend
Hi, i recommend you to remote debug for errors.
it also websocket is not for vscode. (you use normal socket in vscode)
see https://github.com/itemis/xtext-languageserver-example/blob/cd_226wip/org.xtext.example.mydsl.ide/src/org/xtext/example/mydsl/ide/RunServer.java

[Updated on: Mon, 19 April 2021 07:49] by Moderator

Re: Xtext LSP, Client with separate server process [message #1840563 is a reply to message #1840562] Mon, 19 April 2021 07:55 Go to previous messageGo to next message
Eclipse UserFriend
please make also sure you use match lsp4j/xtext and vscode api versions
Re: Xtext LSP, Client with separate server process [message #1840567 is a reply to message #1840563] Mon, 19 April 2021 08:38 Go to previous messageGo to next message
Eclipse UserFriend
Christian, thanks for the hints. I'll look into it. Tx.
Re: Xtext LSP, Client with separate server process [message #1840590 is a reply to message #1840567] Tue, 20 April 2021 02:34 Go to previous message
Eclipse UserFriend
Thanks, Christian for your help.

I am using VS Code version 1.55.0, which uses the 3.16 version of the LSP. In order to make the example work, I needed LSP4j version 0.12.0. Upgrading to Xtext 2.26.0-SNAPSHOT, and vscode-languageclient version to 7.0.0 fixed the issue.

Previous Topic:Formatter2 autowrap
Next Topic:Cross Referencing different Types
Goto Forum:
  


Current Time: Mon Jul 07 11:54:04 EDT 2025

Powered by FUDForum. Page generated in 0.08786 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top