-
Notifications
You must be signed in to change notification settings - Fork 12.2k
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
fix(47562): Add option to suppress type hint if variable name matches type name #48529
Conversation
@andrewbranch we'd need to add the new option to vscode too, right? |
Yep. |
Thank you so much for the feedbacks @andrewbranch @gabritto I'll update the PR to fix the issues you mentioned 👍 |
Thanks @huytd! We’re going to discuss this in our meeting with VS Code next week. Hang tight until then 👍 |
We discussed this today, but were missing a few key people on vacation. I think the issue probably needed a little more design specification before asking for a PR—we discussed the possibility of addressing the noisiness of inlay hints with fuzzy string matching a bit more holistically rather than adding a new setting for each one we eliminate. We’re going to bring it up again next week when we have the full group back. |
Thank you so much for keeping me updated! @andrewbranch |
From microsoft/TypeScript#48529 Let users control is variable type inlay hints are suppresed if the variable name matches the type name, such as: ```ts const range = new Range(); ```
…#150489) From microsoft/TypeScript#48529 Let users control is variable type inlay hints are suppresed if the variable name matches the type name, such as: ```ts const range = new Range(); ```
Fixes #47562
The approach I'm proposing here is to add a new option called
includeInlayVariableTypeHintsWhenTypeMatchesName
for theUserPreferences
.When the user turns off this option, we will check if the variable name matches the type display string and suppress the hint for this case.