Skip to content

feat: add inline value provider support for mcfunction and Molang documents#498

Merged
DaanV2 merged 3 commits into
mainfrom
copilot/add-inline-values-support
May 15, 2026
Merged

feat: add inline value provider support for mcfunction and Molang documents#498
DaanV2 merged 3 commits into
mainfrom
copilot/add-inline-values-support

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 15, 2026

This change adds first-class inline values support to the language server so debug sessions can request variable lookups directly from the server. The implementation introduces the textDocument/inlineValue capability and handles requests for supported Bedrock script languages.

  • Capability + handler wiring

    • Added a new InlineValueService in ide/base/server/src/lsp/inline-values/service.ts.
    • Advertises inlineValueProvider during initialization.
    • Registers a connection.languages.inlineValue.on(...) handler.
  • Inline value generation

    • Supports mcfunction and molang documents.
    • Scans requested line ranges for variable-like identifiers and emits InlineValueVariableLookup entries.
    • Constrains processing to the requested range / stopped location context and returns empty results for unsupported docs.
  • Server integration

    • Wired InlineValueService into setupServer(...) service registration in ide/base/server/src/lsp/server/setup.ts.
onInitialize(capabilities: CapabilityBuilder): void {
  capabilities.set('inlineValueProvider', {
    workDoneProgress: true,
  });
}

setupHandlers(connection: Connection): void {
  this.addDisposable(connection.languages.inlineValue.on(this.onInlineValue.bind(this)));
}

@DaanV2 DaanV2 marked this pull request as ready for review May 15, 2026 20:03
@DaanV2 DaanV2 merged commit d2dc29e into main May 15, 2026
4 checks passed
@DaanV2 DaanV2 changed the title Add LSP inline value provider support for mcfunction and Molang documents feat: add inline value provider support for mcfunction and Molang documents May 15, 2026
@DaanV2 DaanV2 deleted the copilot/add-inline-values-support branch May 15, 2026 20:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants