Skip to content

Cross-file go-to-definition for workspace components - #17

Merged
cushycush merged 1 commit into
mainfrom
feat/cross-file-definition
Apr 17, 2026
Merged

Cross-file go-to-definition for workspace components#17
cushycush merged 1 commit into
mainfrom
feat/cross-file-definition

Conversation

@cushycush

@cushycush cushycush commented Apr 17, 2026

Copy link
Copy Markdown
Owner

Summary

  • gd on a workspace component (e.g. MyButton where MyButton.qml exists) now jumps to the file rather than resolving to nothing.
  • Built-in Qt types keep their existing behavior of navigating to the import line in the current file.
  • Workspace URIs are tracked in a small name→URI map populated by the workspace scanner, so definition.go stays decoupled from Handler.

Test plan

  • go test -race ./...
  • Added two tests: happy path jump, and orphan-symbol safety (no URI recorded).
  • Verify in editor: workspace with MyWidget.qml, open a sibling file using MyWidget {}, gd jumps to the file.

go-to-definition on a user-defined QML component (e.g. `MyButton` where
`MyButton.qml` exists in the workspace) now returns the URI of the .qml
file that defines it. Previously only built-in Qt types navigated to
their import line and workspace components silently dropped through
since their registry entry has an empty Module.

Adds a small name→URI lookup populated by the workspace scanner so
definition.go can resolve cross-file targets without coupling to the
Handler.
@cushycush
cushycush merged commit b97ccb7 into main Apr 17, 2026
3 checks passed
@cushycush
cushycush deleted the feat/cross-file-definition branch April 17, 2026 03:46
cushycush added a commit that referenced this pull request Apr 17, 2026
…-member completion

Reflects features from #16, #17, and this PR in the README so readers
don't have to cross-reference the CHANGELOG.
cushycush added a commit that referenced this pull request Apr 17, 2026
…nt links

The three features shipped in #16, #17, and #18 weren't reflected in the
README. Updates the completions list, broadens the Go to Definition
entry, and adds a Document Links entry.
cushycush added a commit that referenced this pull request Apr 17, 2026
…nt links (#19)

The three features shipped in #16, #17, and #18 weren't reflected in the
README. Updates the completions list, broadens the Go to Definition
entry, and adds a Document Links entry.
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