question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Consider adding setting that only shows inlay hint parameter names for simple literals (string, number, bool)

See original GitHub issue

Suggestion

🔍 Search Terms

  • inlay hints
  • parameter names
  • typescript.inlayHints.parameterNames.enabled

✅ Viability Checklist

N/A, tooling related

⭐ Suggestion

Add a new setting that only shows inlay hints for simple literals. This would include:

  • string
  • number
  • bool
  • regexp literal?
  • null?
  • undefined?

Currently the "typescript.inlayHints.parameterNames.enabled": "literals" setting also shows parameter name hints for function, array, and object literals

I imagine this new setting would be called something like: "typescript.inlayHints.parameterNames.enabled": "simpleLiterals", although better names welcome

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:3
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

3reactions
jessetrinitycommented, Aug 11, 2021

"simple literals" - string, number, bool, regexp, undefined, null

Suggestion: "primitive literals" - string, number, bool, undefined, null

1reaction
mjbvzcommented, Aug 13, 2021

Yes that sounds great. I think that would become the new default for VS Code

Read more comments on GitHub >

github_iconTop Results From Across the Web

Inlay hints | JetBrains Rider Documentation
The idea of the parameter name hints is to show parameter names for arguments whose intention may not be clear, but at the...
Read more >
Does anybody know the name of this setting inside of VS ...
There are three possible values: none — Disable parameter inlay hints. literals — Only show inlay hints for literals (string, number, Boolean).
Read more >
UI: support inlay hints (parameter hints) · Issue #1631 · golang ...
Will include configuration for showing hints for only literals and suppressing hints when an argument matches the parameter name.
Read more >
VS Code API | Visual Studio Code Extension API
VS Code API is a set of JavaScript APIs that you can invoke in your Visual Studio ... t(options: {args: string | number...
Read more >
Language Server Protocol Specification - 3.17
result?: string | number | boolean | object | null; /** * The error object in case a ... The language server protocol...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found