Disable inlay hints for tests (or allow conditional overrides)
See original GitHub issueSuggestion
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!
📃 Motivating Example
As a developer, I want to maximize readability while minimizing noise.
💻 Use Cases
- VSCode
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (4 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Related: #45389
@nmain Then it wouldn’t be the users choice anymore (in case of libraries).