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

feat: show decl module in hover #1638

Merged
merged 1 commit into from
Sep 25, 2022
Merged

Conversation

digama0
Copy link
Collaborator

@digama0 digama0 commented Sep 22, 2022

This adds a in Foo.Bar.Module remark at the end of the hover display. This is helpful for knowing what to import to get access to a certain declaration you can see being used somewhere.

hover_module

I was originally hoping to put a link there along the lines of rust-analyzer's "Go to MyType", but it turns out this is implemented via an LSP extension for "hover commands" and some client support, so I will leave it to the folks who are more involved in the frontend if they want to implement that.

@Kha
Copy link
Member

Kha commented Sep 23, 2022

The namespace/module ambiguity strikes back 😅 . How about "from module Lean.Elab.Term", or even just "import Lean.Elab.Term"?

@digama0
Copy link
Collaborator Author

digama0 commented Sep 23, 2022

I suppose that example wasn't the best to use regarding namespace vs module. The namespace is already visible in the first line though, so I think it should be clear after a few examples? Using import Lean.Elab.Term isn't a bad idea though.

@leodemoura leodemoura merged commit 5644bd7 into leanprover:master Sep 25, 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.

3 participants