Skip to content

Hoogle it for unknown symbol #3187

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

Open
July541 opened this issue Sep 17, 2022 · 9 comments
Open

Hoogle it for unknown symbol #3187

July541 opened this issue Sep 17, 2022 · 9 comments
Labels
type: enhancement New feature or request

Comments

@July541
Copy link
Collaborator

July541 commented Sep 17, 2022

As the image shows, I hope we can add a code action to hoogle it for unknown symbols

image

@July541 July541 added the type: enhancement New feature or request label Sep 17, 2022
@sloorush
Copy link
Contributor

Very useful, but will it get chaotic sometimes and may feel spammy to the user?

@July541
Copy link
Collaborator Author

July541 commented Sep 17, 2022

Very useful, but will it get chaotic sometimes and may feel spammy to the user?

People can disable it anytime, and I think there won't be so many unknown symbols at once.

@sloorush
Copy link
Contributor

Very useful, but will it get chaotic sometimes and may feel spammy to the user?

People can disable it anytime, and I think there won't be so many unknown symbols at once.

Yep! Then this will be pretty useful and fast for the users who want it.

@pepeiborra
Copy link
Collaborator

pepeiborra commented Sep 18, 2022

Why only unknown symbols? I might want to Google Hoogle any identifier that doesn't have documentation or a link to Hackage. Which brings me to the second point, I suspect a hover is a better fit than a code action for this.

@July541
Copy link
Collaborator Author

July541 commented Sep 18, 2022

@jneira told me we have some attempts for hoogle integration, it's fine to have a hover. But for unknown symbols, I just want to redirect users to the hoogle web page because of worrying about the size of hoogle.

https://twitter.com/jneira/status/1571232027583602690

@pepeiborra
Copy link
Collaborator

@jneira told me we have some attempts for hoogle integration, it's fine to have a hover. But for unknown symbols, I just want to redirect users to the hoogle web page because of worrying about the size of hoogle.

https://twitter.com/jneira/status/1571232027583602690

I don't think adding a Hoogle code action that will pop up for every single squiggly is going to be well received by users. On the other hand, a hover that presents a Hoogle link for identifiers that lack documentation might be useful

@July541
Copy link
Collaborator Author

July541 commented Sep 18, 2022

On the other hand, a hover that presents a Hoogle link for identifiers that lack documentation might be useful.

Strongly agree with this.

I don't think adding a Hoogle code action that will pop up for every single squiggly is going to be well received by users.

Following your thought, what should be displayed while hovering on unknown symbols like getFist in the image?

@pepeiborra
Copy link
Collaborator

Following your thought, what should be displayed while hovering on unknown symbols like getFist in the image?

Same as for known symbols without docs, hover should show a link to Hoogle it.

I should also point out that the screenshot that you shared in the issue description is very different from what I see in my HLS installation. Do you not have the ghcide plugins enabled? Maybe you are on 9.4?

image

@July541
Copy link
Collaborator Author

July541 commented Sep 18, 2022

Yes, I'm on 9.4.

Emm, sounds great! So you are thinking to add a link like https://hoogle.haskell.org/?hoogle=getFirst for any symbols without docs(including unknown symbols)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants