proposal: allow hovers on inferred struct types
It's extremely common for newcomers to come across code that looks like this and not know what .{} means:
const foo = b.addStaticLibrary(.{
// ...
});
In some cases, I've seen people prefer writing the full type names in their code and not use inferred types, in order to make ZLS hovers work, e.g.:
const foo = b.addStaticLibrary(std.Build.StaticLibraryOptions{
// ...
});
Proposal: ZLS should be smart enough to know that a hover on .{} is the same as a hover on StaticLibraryOptions and should show the same contents.
Are you proposing that as an example, hovering over the . in a .{} should show its result location type similar to this:
I guess this would also suggest that a go to definition request on the
. should bring you to the definition of std.Build.StaticLibraryOptions.
That would be pretty fantastic for the modal editor workflow, where you can't goto the definition of a type referenced in the on-hover definition popup.
Yep exactly, I agree go-to-def should behave the same