Skip to content

An inlay hint without a label is never resolved, and collecting it throws a NullPointerException #1822

Closed

Description

@lagergren

Problem

An inlay hint without a label, which the server resolves with inlayHint/resolve, never shows, and collecting the hints throws a NullPointerException.

LSPInlayHintsSupport keeps a hint whose label is null when its server supports inlayHint/resolve, and starts the resolve (resolvedInlayHintsFuture in InlayHintData). But nothing reads that future for the label: LSPInlayHintsProvider.buildInlayHints reads inlayHint().getLabel() from the unresolved hint and calls label.isLeft() on null. The only other use of a resolve is the command of a clicked label part.

The label is required by the LSP specification, so only a server which leaves it out, relying on the resolve, is affected. LSPSupport.md says inlayHint/resolve is supported "for an inlay hint without a label".

Expected

LSP4IJ waits for the resolve of a hint without a label, as it waits for the hints, and shows the resolved hint, or drops it when the resolve fails or still has no label.

Activity

  1. added a commit that references this issue on Nov 3, 2026
    0cba7a9
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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions