Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 11:37 Go to next message
Neeraj Bhusare is currently offline Neeraj BhusareFriend
Messages: 176
Registered: July 2009
Location: Canada
Senior Member
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.


Twitter : @NeerajBhusare
Blog : https://nbhusare.github.io/
Best regards, Neeraj
Re: Xtext LSP, Client with separate server process [message #1840562 is a reply to message #1840560] Mon, 19 April 2021 11:46 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14064
Registered: July 2009
Senior Member
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


Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/it-services/methods-and-tools/xtext
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de

[Updated on: Mon, 19 April 2021 11:49]

Report message to a moderator

Re: Xtext LSP, Client with separate server process [message #1840563 is a reply to message #1840562] Mon, 19 April 2021 11:55 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14064
Registered: July 2009
Senior Member
please make also sure you use match lsp4j/xtext and vscode api versions

Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/it-services/methods-and-tools/xtext
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Xtext LSP, Client with separate server process [message #1840567 is a reply to message #1840563] Mon, 19 April 2021 12:38 Go to previous messageGo to next message
Neeraj Bhusare is currently offline Neeraj BhusareFriend
Messages: 176
Registered: July 2009
Location: Canada
Senior Member
Christian, thanks for the hints. I'll look into it. Tx.

Twitter : @NeerajBhusare
Blog : https://nbhusare.github.io/
Best regards, Neeraj
Re: Xtext LSP, Client with separate server process [message #1840590 is a reply to message #1840567] Tue, 20 April 2021 06:34 Go to previous message
Neeraj Bhusare is currently offline Neeraj BhusareFriend
Messages: 176
Registered: July 2009
Location: Canada
Senior Member
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.



Twitter : @NeerajBhusare
Blog : https://nbhusare.github.io/
Best regards, Neeraj
Previous Topic:Formatter2 autowrap
Next Topic:Cross Referencing different Types
Goto Forum:
  


Current Time: Wed Sep 22 21:51:54 GMT 2021

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

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

Back to the top