-
-
Notifications
You must be signed in to change notification settings - Fork 336
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
Struct init type hints #1778
Struct init type hints #1778
Conversation
src/features/inlay_hints.zig
Outdated
var buffer: [2]Ast.Node.Index = undefined; | ||
const struct_init = tree.fullStructInit(&buffer, node) orelse return; | ||
for (struct_init.ast.fields) |value_node| { // the node of `value` in `.name = value` | ||
const name_token = tree.firstToken(value_node) - 2; // get --------------^^^^ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note to self: Disable inlay hints before aligning comments ...
bc32bc6
to
2af33d3
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1778 +/- ##
==========================================
+ Coverage 76.77% 76.92% +0.15%
==========================================
Files 35 35
Lines 10177 10190 +13
==========================================
+ Hits 7813 7839 +26
+ Misses 2364 2351 -13 ☔ View full report in Codecov by Sentry. |
Coming up with a name for a config options is definitely not my strong suit. (╥﹏╥) |
Are they anon literals though? + it works for regular |
2af33d3
to
6d1713d
Compare
oh right, then "inlay_hints_show_struct_literal_field_type"? |
Co-authored-by: Techatrix <[email protected]>
a181866
to
2e31eaa
Compare
Partial #1531
Techatrix you get to name the config option :)