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

[Merged by Bors] - feat(widget): add go to definition button. #3982

Closed
wants to merge 7 commits into from

Conversation

EdAyers
Copy link
Member

@EdAyers EdAyers commented Aug 30, 2020

Now you can hit a new button in the tooltip and it will reveal the definition location in the editor!

Now you can hit a new button in the tooltip and it will reveal the definition location in the editor!
@EdAyers EdAyers requested a review from gebner August 30, 2020 12:06
@EdAyers
Copy link
Member Author

EdAyers commented Aug 30, 2020

It's using environment.decl_olean to get the file location, but I don't know how reliable that is.

@gebner
Copy link
Member

gebner commented Aug 30, 2020

There's no chance we could get ctrl+click with underline on ctrl+hover like in the editor, right? 😄

@gebner
Copy link
Member

gebner commented Aug 30, 2020

It's using environment.decl_olean to get the file location, but I don't know how reliable that is.

If decl_olean returns none, then this means "current file". I believe that we made sure to support this in all the widget functions.

-- you can't go to foo atm
def foo := 5
example : foo = foo := begin end

@EdAyers
Copy link
Member Author

EdAyers commented Aug 30, 2020

ctrl+click could be done in theory but it would require some plumbing in core lean.

Copy link
Member

@gebner gebner left a comment

Choose a reason for hiding this comment

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

Otherwise lgtm.

bors d+

src/tactic/interactive_expr.lean Show resolved Hide resolved
src/tactic/interactive_expr.lean Outdated Show resolved Hide resolved
src/tactic/interactive_expr.lean Outdated Show resolved Hide resolved
@bors
Copy link

bors bot commented Aug 30, 2020

✌️ EdAyers can now approve this pull request. To approve and merge a pull request, simply reply with bors r+. More detailed instructions are available here.

@bryangingechen bryangingechen added the delegated The PR author may merge after reviewing final suggestions. label Aug 30, 2020
EdAyers and others added 4 commits August 30, 2020 17:32
@EdAyers
Copy link
Member Author

EdAyers commented Aug 30, 2020

bors r+

@bors
Copy link

bors bot commented Aug 30, 2020

Canceled.

@PatrickMassot
Copy link
Member

bors merge

@github-actions github-actions bot added the ready-to-merge All that is left is for bors to build and merge this PR. (Remember you need to say `bors r+`.) label Aug 30, 2020
bors bot pushed a commit that referenced this pull request Aug 30, 2020
Now you can hit a new button in the tooltip and it will reveal the definition location in the editor!

Co-authored-by: Ed Ayers <EdAyers@users.noreply.github.com>
@bors
Copy link

bors bot commented Aug 30, 2020

Pull request successfully merged into master.

Build succeeded:

@bors bors bot changed the title feat(widget): add go to definition button. [Merged by Bors] - feat(widget): add go to definition button. Aug 30, 2020
@bors bors bot closed this Aug 30, 2020
@bors bors bot deleted the widget-goto-def branch August 30, 2020 20:16
robertylewis pushed a commit that referenced this pull request Aug 31, 2020
Now you can hit a new button in the tooltip and it will reveal the definition location in the editor!

Co-authored-by: Ed Ayers <EdAyers@users.noreply.github.com>
PatrickMassot pushed a commit that referenced this pull request Sep 8, 2020
Now you can hit a new button in the tooltip and it will reveal the definition location in the editor!

Co-authored-by: Ed Ayers <EdAyers@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
delegated The PR author may merge after reviewing final suggestions. ready-to-merge All that is left is for bors to build and merge this PR. (Remember you need to say `bors r+`.)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants