Skip to content

Improve readability of diagnotic hovers #54503

@felixfbecker

Description

@felixfbecker

The number one annoyance I have and hear from people about VS Code + TypeScript is that type errors are hard to read. TypeScript will display nested type errors with each level indented, but because of the line wrapping, that indentation basically lost.
This makes the error hard to follow and in consequence hard to solve.

image

Here are things that I think would improve the readability:

  • Add an option to enable horizontal scrolling in hovers. This would mean the indentation would actually have the intended visual effect.
  • Make the width of the hover configurable. I have way more space on my screen it could utilize.
  • Add smart wrapping that preserves indentation.
  • Add markdown support to diagnostics and make TypeScript output markdown. This would mean not the whole diagnostic has to be rendered in a monospace font, therefor saving horizontal space. The parts that are code would use backticks instead of single quotes.

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions