Skip to content

Add AST viewer to Langium VSCode extension - #2185

Open
gfontorbe wants to merge 6 commits into
eclipse-langium:mainfrom
gfontorbe:gfontorbe/inspector
Open

Add AST viewer to Langium VSCode extension#2185
gfontorbe wants to merge 6 commits into
eclipse-langium:mainfrom
gfontorbe:gfontorbe/inspector

Conversation

@gfontorbe

@gfontorbe gfontorbe commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Adds a treeview contribution to the Langium VSCode extension to display the opened document's AST.

@gfontorbe gfontorbe changed the title Replace webview with VSCode native treeview Add AST view to Langium VSCode extension Jul 10, 2026
@gfontorbe
gfontorbe force-pushed the gfontorbe/inspector branch from 05945f6 to 6d9d0b5 Compare July 10, 2026 11:43
@gfontorbe gfontorbe changed the title Add AST view to Langium VSCode extension Add AST viewer to Langium VSCode extension Jul 10, 2026

@spoenemann spoenemann left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Just a detail

Comment thread examples/arithmetics/src/extension.ts Outdated
async function registerInspector(client: LanguageClient, languageId: string): Promise<vscode.Disposable> {
const vscodeApi = await import('vscode');
try {
await vscodeApi.commands.executeCommand('langium-inspector.register', client, languageId);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this missing a return? Otherwise we always return a disposable that does nothing.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's missing the unregistration logic completely. Fixing that

@gfontorbe
gfontorbe requested a review from spoenemann July 30, 2026 07:16
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.

2 participants