feat: go-to-definition + fix tab sync and unused-binding diagnostics#18
Merged
Conversation
Register Monaco DefinitionProvider backed by the WASM ParsedDocument's get_definition() API. Supports F12 and Cmd/Ctrl+click. The ParsedDocument is now kept alive across re-parses instead of being freed immediately. Fix inactive tabs setting editor decorations: tokens-panel and ast-panel update() methods no longer auto-sync cursor position. Sync is now driven solely by the cursor handlers in main.ts, gated on the active tab. When switching to a sync tab, an initial sync is triggered.
Port two guards from vscode-fink: skip non-Ident bind sites (synthetic nodes from lambdas/patterns) and skip module-level bindings in multi- expression modules (parent_scope check for the synthetic module-fn wrapper). Fixes spurious "unused binding '?'" warnings on anonymous fns.
|
This PR will release v1.11.0 |
|
🎉 This PR is included in version 1.11.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
DefinitionProviderbacked by the WASMget_definition()API. Supports F12 and Cmd/Ctrl+click. TheParsedDocumentis kept alive across re-parses for cursor-time queries.update()— sync is gated on the active tab. Switching to a sync tab triggers an initial sync.is_identand multi-expr module-level guards from vscode-fink, fixing spurious "unused binding '?'" warnings on anonymous functions.Test plan
foo = 1/foo 1— F12 or Cmd+click on secondfoojumps to bindingfoo = fn: fn a: a + 1— no "unused binding '?'" warnings