-
Notifications
You must be signed in to change notification settings - Fork 36.4k
Closed
Labels
Milestone
Description
Refs
Complexity: 3
Inlay Hints now use the new Injected Text feature of the core editor.
This enables line wrapping to be aware of Inlay Hints and supports cursor stops around inlay hints.
Prep
Enable inlay hints for TypeScript:
"editor.inlayHints.enabled": true,
"typescript.inlayHints.parameterNames.enabled": "literals",
Ensure that you open a repository that uses TypeScript 4.4.* (such as microsoft/vscode).

Ensure that inlay hints are shown like this:

If no inlay hint is shown, it is unlikely that this is caused by the injected text adoption.
Testing
Play around with inlay hints and verify that
- the cursor is never inside of an inlay hint (even when the inlay hint appears where the cursor used to be)
- When wrapping is enabled, lines with inlay hints are wrapped correctly (F1 -> toggle word wrap).
- Long inlay hints are wrapped
- You can put the cursor before and after an inlay hint. However, left/right movements will always behave as if there was no inlay hint, so one of those cursor stops is skipped, depending on the direction of the movement operation.
- arrow+up/down works and does not jump into inlay text