Skip to content

feat: add completion and hover language-feature providers#5

Open
jlee-kitware wants to merge 1 commit into
masterfrom
language-feature-providers
Open

feat: add completion and hover language-feature providers#5
jlee-kitware wants to merge 1 commit into
masterfrom
language-feature-providers

Conversation

@jlee-kitware

Copy link
Copy Markdown
Collaborator

Add completion and hover props to the Editor widget. Each names a trame @trigger that receives (code, line, column) and returns results; the component registers Monaco completion/hover providers that call the trigger over the existing websocket and map the normalized results onto Monaco. The consumer writes only Python: no client-side JavaScript and no access to the Monaco instance are required.

  • completion items: {label, kind, detail, documentation, insertText}
  • hover: a markdown string, a list of strings, or {contents: [...]}
  • positions: line is 1-based, column is 0-based
  • requests honor Monaco's CancellationToken; providers are disposed on unmount and re-registered when the language changes
  • adds a jedi-backed Python example under example/language-features

this is not an LSP as what is proposed in the language-servers branch. as such we can register other complete handlers like a live-state contextual complete as demonstrated in the example. This capability is complementary to the LSP capability.

@jlee-kitware jlee-kitware force-pushed the language-feature-providers branch from 6fea1ee to 171adb0 Compare June 12, 2026 23:01
Add `completion` and `hover` props to the Editor widget. Each names a
trame @trigger that receives (code, line, column) and returns results;
the component registers Monaco completion/hover providers that call the
trigger over the existing websocket and map the normalized results onto
Monaco. The consumer writes only Python: no client-side JavaScript and
no access to the Monaco instance are required.

- completion items: {label, kind, detail, documentation, insertText}
- hover: a markdown string, a list of strings, or {contents: [...]}
- positions: line is 1-based, column is 0-based
- requests honor Monaco's CancellationToken; providers are disposed on
  unmount and re-registered when the language changes
- adds a jedi-backed Python example under example/language-features
@jlee-kitware jlee-kitware force-pushed the language-feature-providers branch from 171adb0 to a6ece94 Compare June 12, 2026 23:45
@jlee-kitware jlee-kitware requested a review from jourdain June 13, 2026 00:31
@jlee-kitware jlee-kitware self-assigned this Jun 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant