Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide tolerant parser API, TextDocuments, LanguageModelCache to help developping language server #182

Open
angelozerr opened this issue Apr 18, 2018 · 6 comments

Comments

@angelozerr
Copy link

I'm developping a Freemarker language server https://github.com/angelozerr/freemarker-languageserver and to do that, I have translated some VSCode code written in TypeScript in Java like TextDocuments, LanguageModelCache, Scanner, parser (from HTML languages services). While developping those features, I have noticed that those code could be used too for other language like XML for https://github.com/microclimate-devops/xml-language-server.

I tell me if my commons code could be hosted inside lsp4j inside a new project like org.eclipse.lsp4j.services.

If you think it's a bad idea, please close this issue.

@spoenemann
Copy link
Contributor

We haven't included any code specific to the implementation of language servers or clients yet. I'm not sure whether that would exceed the scope of LSP4J.

I propose we keep this issue open and point interested people to it so they can submit their opinion. If there is enough interest in such an additional module and there are volunteers to maintain it, we could add it.

@angelozerr
Copy link
Author

angelozerr commented Apr 25, 2018

Thanks for your answer @spoenemann. I have created this issue because I have noticed that VSCode provides some API which are used in their HTML, JSON, etc language server. So I wonder where we could provide those some helpful API (TextDocuments, LanguageModelCache, Scanner, parse) in Java word.

@spoenemann
Copy link
Contributor

I use Xtext to implement language servers. All necessary services for language server implementation are already available there.

@rgrunber
Copy link

To add to this scenario :

An issue was encountered on eclipse/lemminx#1162 (XML language server) that the JDT language server already handled. Both could have benefited from some common framework. Even things like https://github.com/eclipse/lemminx/blob/master/org.eclipse.lemminx/src/main/java/org/eclipse/lemminx/commons/ParentProcessWatcher.java would be common to be copied over among language servers.

@pisv
Copy link
Contributor

pisv commented Jan 31, 2022

Could not a framework for language servers be created on top of LSP4J as a separate project, like LXTK was created for language clients? I concur with Miro that including the proposed server-specific parts would probably exceed the scope of LSP4J as a lower-level framework with the intended symmetry of use in both language servers and clients.

I can even imagine that there can be multiple frameworks on top of LSP4J for implementing language servers. Hint: Xtext is one of such frameworks already.

@spoenemann
Copy link
Contributor

I think we could make that part of the scope for LSP4J, but before doing so we need to ensure that there are volunteers to maintain the new code (probably a separate Maven module).

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

No branches or pull requests

4 participants