Skip to main content



      Home
Home » Modeling » TMF (Xtext) » Language Server Protocol Syntax Highlighting
Language Server Protocol Syntax Highlighting [message #1796598] Tue, 16 October 2018 08:15 Go to next message
Eclipse UserFriend
I am building a VS-Code Plugin based on this Project Setup:

https://github.com/itemis/xtext-languageserver-example

Although language server protocol supports syntax highlighting, it seems in VS-Code Extension, I need to create a json File, and explicitly state all keywords that I want the IDE to highlight.

However , I have many keywords and I would like out of the box highlighting for all the keywords defined in my Xtext Grammar?

Is there something I can do on the server side, for example in my IDE Project to achieve this?

Thanks
Re: Language Server Protocol Syntax Highlighting [message #1796600 is a reply to message #1796598] Tue, 16 October 2018 08:20 Go to previous messageGo to next message
Eclipse UserFriend
No you have to implement whatever your client offers for that (eg Textmaterial grammar)

[Updated on: Tue, 16 October 2018 08:20] by Moderator

Re: Language Server Protocol Syntax Highlighting [message #1796602 is a reply to message #1796600] Tue, 16 October 2018 08:28 Go to previous messageGo to next message
Eclipse UserFriend
You may make use of GrammarUtil.getAllKeywords
In a Java Main

Call standalonesetup
Ask injector for grammaraccess
Ask grammar access for grammar
Call until

You may evenwrite a own fragment and add it to the workflow
Re: Language Server Protocol Syntax Highlighting [message #1796624 is a reply to message #1796602] Tue, 16 October 2018 10:53 Go to previous message
Eclipse UserFriend
@Christian Thanks I will try that!

[Updated on: Tue, 16 October 2018 10:53] by Moderator

Previous Topic:class can not be resolved to type
Next Topic:How to implement the type validation test for my grammar
Goto Forum:
  


Current Time: Sat Jun 21 17:40:33 EDT 2025

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

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

Back to the top