Skip to content
This repository has been archived by the owner on Apr 21, 2023. It is now read-only.

[Language Server] Notifications about supported languages (and syntax highlighting) #1001

Closed
soerendomroes opened this issue Jan 23, 2019 · 5 comments
Labels

Comments

@soerendomroes
Copy link

I know syntax highlighting is a client thing #283, but it would be nice to have a language server that can notify connecting clients about the languages (and maybe keywords or other information about the languages).
I use a language server that supports multiple DSLs that may change over time and Theia as a client.

Is this something you plan to add, is it out of question (as mentioned in #283), or does this already work via semantic coloring (the syntax highlighting part)?

@cdietrich
Copy link
Member

cc @kittaakos can you help out here?

@kittaakos
Copy link
Member

@soerendomroes, although the semantic highlighting extension is not yet part of the LSP, LSP4J has the API for it with @Beta. See here.

Here, you can find a reference implementation for YANG 1.1 with Xtext. Please note, there are known limitations this point in Theia. Also, you have to define your TextMate grammar with the scopes.

@soerendomroes
Copy link
Author

Ok, I already looked into that, but it does not seem useful for my context, since keywords of the language are still hard coded in the TextMate grammar. Currently I use an LS-extension that responses with the keywords for the languages and dynamically adds syntax highlighting.
Back to my question: Is it planed to add a notification to inform the client which languages the LS supports? This seems to be a useful feature to me.

@cdietrich
Copy link
Member

i still dont see what problem that solves:

  • the packaging of ls is client specific so it already knows the languages anyway cause you have to define what languages exist in all clients
  • the keywords for client side highlighting and the one from server side highlighting dont need to relate. so the server will send the highlighting regions for the keywords as well. so an empty list or some dummy keywords in the textmate grammar should be sufficient

@soerendomroes
Copy link
Author

Ok, I did not know that the keywords where not relevant, thank you :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants