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

Go To Definition for Imports #287

Closed
Kha opened this issue Jan 21, 2021 · 4 comments · Fixed by #929
Closed

Go To Definition for Imports #287

Kha opened this issue Jan 21, 2021 · 4 comments · Fixed by #929
Labels
enhancement New feature or request

Comments

@Kha
Copy link
Member

Kha commented Jan 21, 2021

No description provided.

@Kha Kha added the enhancement New feature or request label Jan 21, 2021
@leodemoura
Copy link
Member

and "Go To Definition for notation/macros" :)

@larsk21
Copy link
Contributor

larsk21 commented Jan 7, 2022

and "Go To Definition for notation/macros" :)

What is the current state of this? I have noticed that "go to definition" already works on notation/macros such as <$> or #[], but not on, for example, <|.

@Kha
Copy link
Member Author

Kha commented Jan 10, 2022

I have noticed that "go to definition" already works on notation/macros such as <$> or #[], but not on, for example, <|.

Go-to for builtins should be covered by #937. <|, however, is an unfortunate special case: since it unfolds to syntax that is made up of "original" tokens only (more specifically, the first and last token are original), the editor instead jumps to elabApp.

@Kha
Copy link
Member Author

Kha commented Jan 10, 2022

The relevant check is at

return i.contains hoverPos
, so this affects other users of hoverableInfoAt? as well. A potential fix could be to choose the innermost info node that is not contained in an info node of the same range, but that is not immediately implementable using the current smallestInfo?.

@Kha Kha linked a pull request Jan 14, 2022 that will close this issue
@Kha Kha closed this as completed in #929 Jan 14, 2022
ChrisHughes24 pushed a commit to ChrisHughes24/lean4 that referenced this issue Dec 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants