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

Hover provider for crossrefs #473

Merged
merged 8 commits into from
Apr 25, 2022
Merged

Hover provider for crossrefs #473

merged 8 commits into from
Apr 25, 2022

Conversation

gfontorbe
Copy link
Contributor

Solves part of #355

Added hover behavior when hovering a cross-reference.

  1. If the cross-reference references a type alternative, the hover content is the type alternative itself.
type T = A | B;

R : prop = [T];

Hovering over [T] displays type T = A | B;

  1. If the cross-reference refers to a parser rule and has an explicit terminal.
R: prop = [T:X];

Hovering over [T:X] displays [T:X]

  1. If the cross-reference refers to a parser rule and has no explicit terminal
R: prop = [T]

Hovering over [T] displays [T:X] with X being the terminal associated with the property name in the rule T

@gfontorbe gfontorbe requested review from spoenemann and removed request for spoenemann April 11, 2022 12:08
@gfontorbe gfontorbe linked an issue Apr 11, 2022 that may be closed by this pull request
@gfontorbe gfontorbe requested a review from msujew April 12, 2022 13:41
Copy link
Member

@msujew msujew left a comment

Choose a reason for hiding this comment

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

Looking mostly good, just some more minor issues.

Copy link
Member

@msujew msujew left a comment

Choose a reason for hiding this comment

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

Thanks, looks good to me!

@gfontorbe gfontorbe merged commit a06aa60 into main Apr 25, 2022
@gfontorbe gfontorbe deleted the cross-reference-hover branch April 25, 2022 10:02
@spoenemann spoenemann added this to the v0.4.0 milestone May 13, 2022
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.

Hovering for implicit behavior in the grammar language
3 participants