Skip to content

Extensibility of lsp features #2

Open

Description

@angelozerr

@tsmaeder I create the issue even if you answered me #1 (comment)

That's a definite no

But I think if Java-LS is the right mean to manage Java Language Server, I think it will important to support this extensiblity mechanism.

For instance in our case, our Quarkus support which manages Quarkus / MicroProfile validation does that with JDT.LS

I understand your point of view with API break, but in LemMinX XML Language Server we can customize for instance validation with particpant registered via Java SPI

Activity

  1. tsmaeder commented on Sep 16, 2026

    @tsmaeder
    Owner

    I'm interested to know how you interact with the Java language server in your XML LS? Runtime in-process extensions are problematic for various reasons, but maybe there is a different way to address the requirements.

  2. tsmaeder commented on Sep 16, 2026

    @tsmaeder
    Owner

    In Theia, we have a mix of run-time extensibility and compile time extensibility: some things can be extended by unknown third parties, whereas if you want to alter the main-line behavior of the framework, you have to compile your own distribution. I think that's a sensible approach.

  3. angelozerr commented on Sep 16, 2026

    @angelozerr
    Author

    I'm interested to know how you interact with the Java language server in your XML LS?

    I don't do that, even if it should be possible I think.

    By extensibility I mean add custom validation, custom completion etc.

    The idea is very simple. When XML Language Server is started, the start command add custom JARs which registers custom validation, completion etc with Java SPI (see for instance for vscode https://github.com/redhat-developer/vscode-xml/blob/442471559bcf2b7b7cd5e2c73dad114775222d2a/src/server/java/javaServerStarter.ts#L96)

    In vscode side, see doc at https://github.com/redhat-developer/vscode-xml/blob/main/docs/Extensions.md#custom-xml-extensions-written-in-java

    It is managed with https://github.com/redhat-developer/vscode-xml/blob/442471559bcf2b7b7cd5e2c73dad114775222d2a/src/plugin.ts#L10

  4. angelozerr commented on Sep 17, 2026

    @angelozerr
    Author

    @tsmaeder if you are opened with this idea, I could try to provide this Java SPI extensiblity with diagnostics and a sample with Quarkus or Qute.

  5. tsmaeder commented on Sep 17, 2026

    @tsmaeder
    Owner

    I'm interested to know how you interact with the Java language server in your XML LS?

    I don't do that, even if it should be possible I think.

    By extensibility I mean add custom validation, custom completion etc.

    The idea is very simple. When XML Language Server is started, the start command add custom JARs which registers custom validation, completion etc with Java SPI (see for instance for vscode https://github.com/redhat-developer/vscode-xml/blob/442471559bcf2b7b7cd5e2c73dad114775222d2a/src/server/java/javaServerStarter.ts#L96)

    Well, then the question becomes how the custom jar and commands interacts with the language server. What information does it consume or provide?

  6. angelozerr commented on Sep 17, 2026

    @angelozerr
    Author

    Let me explore more java-ls to give you a relevant answer and try to do something.

    When you will have time, please review #3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions