-
-
Notifications
You must be signed in to change notification settings - Fork 309
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
Hover improvements #1282
Hover improvements #1282
Conversation
Maybe it's too early in the morning here and I'm not getting the full picture ..but I have reservations 1 Knowing the underlying type at a glance is valuable, |
Is there some way in which both the alias and the actual type could be provided? |
Thank you for the feedback. These are valid objections! My original thought process was that since composite types like
Great suggestion, that definitely should be possible. |
This looks excellent! Regarding
I have no strong opinion on the matter, this is what Go To Def does as it is, and although it might be convenient to provide the choice it might get cramped. Technically Go To Def should pop open |
Follow up to #1281
Resolve underlying type recursively
Before
Avoid duplicate "Go to <type>"
Before
Add hover info for optional type and error union
Simplify resolved
if
/switch
type when branches return same typeResolve type to alias for "Go to <type>" when possible
Before
For reference,
Ast.Node.Index
is defined asconst Index = u32;
This changes the behavior of "Go to std.mem.Allocator". Instead of opening
std/mem/Allocator.zig
, now it will openstd/mem.zig
and go to the line that hasconst Allocator = @import("mem/Allocator.zig");