Skip to content

Link schema hover to the model's table definition - #730

Open
yoshiyoshiharu wants to merge 1 commit into
Shopify:mainfrom
yoshiyoshiharu:schema-hover-link-to-table-location
Open

Link schema hover to the model's table definition#730
yoshiyoshiharu wants to merge 1 commit into
Shopify:mainfrom
yoshiyoshiharu:schema-hover-link-to-table-location

Conversation

@yoshiyoshiharu

@yoshiyoshiharu yoshiyoshiharu commented Sep 5, 2026

Copy link
Copy Markdown

Fixes #52.

The Schema link in a model's hover opens db/schema.rb at the top, so you still have to find the
table yourself. This makes it jump to the model's create_table block.

This was already being worked on in #212, which takes a similar approach. That PR is still open but
has had no activity since March 2024, so rather than leave the issue sitting I put together a fresh
implementation. Happy to close this in favour of #212 if it's still moving.

@yoshiyoshiharu
yoshiyoshiharu marked this pull request as ready for review September 5, 2026 13:01
@yoshiyoshiharu
yoshiyoshiharu requested a review from a team as a code owner September 5, 2026 13:01
@yoshiyoshiharu

Copy link
Copy Markdown
Author

I have signed the CLA!

@yoshiyoshiharu
yoshiyoshiharu force-pushed the schema-hover-link-to-table-location branch from c11de2d to 487c74f Compare September 6, 2026 02:15
The "Schema" link in hover now jumps straight to the
model's create_table block in schema.rb instead of just the top of
the file, using a Prism visitor to locate it by table name. Falls
back to the plain file link for structure.sql or when the table
can't be found.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@yoshiyoshiharu
yoshiyoshiharu force-pushed the schema-hover-link-to-table-location branch from 487c74f to 4bce439 Compare September 6, 2026 02:21
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.

Enhance our schema hover link to jump to the right table

1 participant