Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Indicate primary key in schema hover #313

Closed
andyw8 opened this issue Mar 27, 2024 · 0 comments · Fixed by #316
Closed

Indicate primary key in schema hover #313

andyw8 opened this issue Mar 27, 2024 · 0 comments · Fixed by #316
Labels
enhancement New feature or request good-first-issue Good for newcomers

Comments

@andyw8
Copy link
Contributor

andyw8 commented Mar 27, 2024

When hovering over an ActiveRecord model, we show a schema consisting of the field names and types. It could be useful to also indicate the primary key, e.g. with a (PK) suffix.

To check which field is the primary key, we can call .primary_key on the model class.

@andyw8 andyw8 added enhancement New feature or request good-first-issue Good for newcomers labels Mar 27, 2024
Earlopain added a commit to Earlopain/ruby-lsp-rails that referenced this issue Apr 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good-first-issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant