Skip to content

Add an inline inlay-hint display mode #1

Description

@Ky6uk

Summary

Add an optional inline display mode based on VS Code inlay hints while preserving CodeLens as the initial default.

Motivation

The current CodeLens provider analyzes every eligible symbol in a document and adds a dedicated row above each result. An inlay hint provider receives a requested document range, so inline mode can limit reference lookups to symbols in that range and avoid vertical layout changes.

Scope

  • Add zeroReference.displayMode with codeLens and inline values.
  • Register an InlayHintsProvider for the existing TypeScript and JavaScript document selectors.
  • Reuse the existing symbol eligibility, declaration grouping, concurrency, cancellation, and stale-result rules.
  • Analyze only eligible declarations contained by the requested range.
  • Render a compact 0 workspace references hint at the declaration line.
  • Ensure only the selected display provider is active.
  • Share refresh and invalidation behavior with CodeLens mode.

Acceptance criteria

  • Inline mode emits hints only for declaration-only reference groups.
  • No reference lookup is made for a declaration outside the requested range.
  • Changing the display mode refreshes the editor without reloading the extension host.
  • Cancellation, document changes, and configuration changes discard stale results.
  • A focused regression test proves that a large document performs lookups only for symbols in the requested range.
  • Existing CodeLens behavior remains the default for the first release.

Dependencies

Out of scope

  • Making inline mode the default without real-world UX and performance validation.
  • Adding new language identifiers.

Activity

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

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions