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.

Disable inlay hints for tests (or allow conditional overrides)

See original GitHub issue

Suggestion

Originally opened at https://github.com/microsoft/vscode/issues/132304 - they asked me to file upstream.

🔍 Search Terms

inlay hints

✅ Viability Checklist

My suggestion meets these guidelines:

  • This wouldn’t be a breaking change in existing TypeScript/JavaScript code
  • This wouldn’t change the runtime behavior of existing JavaScript code
  • This could be implemented without emitting different JS based on the types of the expressions
  • This isn’t a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, new syntax sugar for JS, etc.)
  • This feature would agree with the rest of TypeScript’s Design Goals.

⭐ Suggestion

I ❤️ the new inlay hints feature. One area where it’s a bit noisy is in tests, though. Even with the literals setting, it shows up for Jest (and similar) test blocks (describe, it, test). Please consider adding a way to override this for certain cases. Thank you!

image

📃 Motivating Example

As a developer, I want to maximize readability while minimizing noise.

💻 Use Cases

  • VSCode

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
MartinJohnscommented, Sep 8, 2021

Related: #45389

1reaction
MartinJohnscommented, Sep 8, 2021

@nmain Then it wouldn’t be the users choice anymore (in case of libraries).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Inlay hints | ReSharper Documentation - JetBrains
If you do not use inlay hints, you can disable them by clearing the Enable Inlay Hints checkbox on the Environment | Inlay...
Read more >
User and Workspace Settings - Visual Studio Code
This setting is overridden based on the file contents when `#editor.detectIndentation` is on. "editor.indentSize": "tabSize", // Enables the inlay hints in ...
Read more >
User Manual - rust-analyzer
To help us out by testing the newest code, you can enable pre-release versions in the Code ... inlay hints for variables and...
Read more >
Configuring and using Jetbrains Rider 2021.1.1 and Visual ...
For the same reason, I disable almost all inlay hints in Rider/ReSharper ... Rider/ReSharper will also allow you to override these settings, ...
Read more >
extraclangtools(1) - Arch manual pages
Inlay hints are now on-by-default in clangd, if the client supports and ... check accept string literal to pointer decay in conditional operator...
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