-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Consider adding setting that only shows inlay hint parameter names for simple literals (string, number, bool) #45295
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
Comments
@mjbvz Is it possible to have an array as an option? To allow users to choose what literals should be handled. Or adding "literals" | ["string", "number", "bool", "regexp", "null", "undefined"] |
Yes, we just would need to make sure VS Code's settings editor can render it nicely One option is to have settings per type: This is what we do for the suggest settings in VS Code, such as The other option would be to have a single setting with checkboxes. This is similar to what the gitLens extension does: On the TS side, we could provide the setting in whatever format is most convenient for you On the VS Code side, I think I'd prefer the first approach for discoverability. This is getting a bit beyond the original issue's scope, but the main options I'd personally want are:
|
@mjbvz Thanks for the detailed clarification. Currently option
New options:
Which option should handle |
Suggestion: |
@mjbvz I can try to create a POC with one option |
Yes that sounds great. I think that would become the new default for VS Code |
Suggestion
π Search Terms
β Viability Checklist
N/A, tooling related
β Suggestion
Add a new setting that only shows inlay hints for simple literals. This would include:
Currently the
"typescript.inlayHints.parameterNames.enabled": "literals"
setting also shows parameter name hints for function, array, and object literalsI imagine this new setting would be called something like:
"typescript.inlayHints.parameterNames.enabled": "simpleLiterals"
, although better names welcomeThe text was updated successfully, but these errors were encountered: