Skip to content

Test: Injected Text Adoption For Inlay Hints #129381

@hediet

Description

@hediet

Refs

Complexity: 3

Create Issue

Create Issue


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).
image

Ensure that inlay hints are shown like this:
image

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions