Skip to content

A document matcher whose async match fails takes away every language server of the file #2161

Done

Description

@lagergren

What happens

A language server definition can match files asynchronously, through a DocumentMatcher whose matchAsync returns a CompletableFuture<Boolean>.

LanguageServiceAccessor.getMatchedLanguageServerDefinitions waits for every such matcher of a file in one CompletableFuture.allOf(...), with no error handling. So when one matcher's future fails (its matchAsync throws inside the future, or completes it exceptionally), the whole async match fails.

getMatchedLanguageServersWrappers then fails too: the language servers that matched the file synchronously are lost along with the async ones, and the file gets no LSP feature at all.

So a bug in one plugin's matcher takes away the language servers of every other plugin, and every user-defined one, for that file.

This is the same pattern as #2158, which is about a language server that fails to start.

Expected

A matcher that fails counts as "no match" for its definition, and its failure is logged with the definition's name. The other definitions, synchronous and asynchronous, still match. A cancellation is ignored, as elsewhere.

Activity

  1. added
    bug
    on Nov 23, 2026
  2. added this to the 0.30.2 milestone on Nov 23, 2026
  3. added a commit that references this issue on Nov 24, 2026
    b001328
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

    bug

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions