-
-
Notifications
You must be signed in to change notification settings - Fork 658
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
Display qualified type names on LSP hover #2993
Comments
Posting here for whoever works on this (I might work on this but wanna see if others have thoughts). The main difficulty with implementing this is that the types that the LSP prints are created using the same type pretty printer that the docs and error messages use. Currently that pretty printer only qualifies types if there would be a collision with an existing type that has already been printed. Making this change would require changing the behavior in a way that still lets those work the same as today (maybe by allowing the caller to pass in modules to never qualify and defaulting to qualify unless the module is explicitly excepted) |
There are multiple LSP related tickets open that want a context aware printer, so making one and switching over all the LSP stuff sounds good to me. |
When you hover over a variable the LSP can show its type. In this example you can see that it shows
List(Error)
, I think the LSP should show theError
type as qualified since it's not defined in the same module and I didn't import It qualified from the module it's defined in. So what I'd like to see here isList(rule.Error)
Not sure how feasible this is and we would probably want to make exceptions for prelude types but I think it could make the type on hover more helpful
The text was updated successfully, but these errors were encountered: