Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Add Syntax Highlighting for Semantic TypeScript Diagnostics #100742

Closed
hediet opened this issue Jun 22, 2020 · 3 comments
Closed
Assignees
Labels
*duplicate Issue identified as a duplicate of another issue(s) languages-diagnostics Source problems reporting

Comments

@hediet
Copy link
Member

hediet commented Jun 22, 2020

It is very hard to see what is going on given this error message:

image

If VS Code's markdown support could be used in those semantic diagnostics, types could be put in code blocks. This would increase readability significantly.

image

I suggest the following rule:
Treat everything in TS error messages enclosed with ' as code (in the following $code). If $code is shorter than 15 characters, emit it as `$code`, otherwise as

```ts
$code
```

Of course this makes the assumption that the formatting of types is consistent and typescript does not nest ' in its error messages. String literal types use ".

If you point me to the central code locations that might need to be touched, I can try to create a PR for this.

@sandy081
Copy link
Member

@mjbvz Is this duplicate of #54272 ?

@hediet
Copy link
Member Author

hediet commented Jun 24, 2020

Oh, I assumed displaying markdown in diagnostics was already possible. Additionally to #54272, this would also need concrete changes for the typescript extension to make use of the markdown.

@mjbvz
Copy link
Collaborator

mjbvz commented Jun 24, 2020

Closing as a duplicate of #54272

@hediet Yes, we would only want to enable highlighting if an extension requests it (such as using markdown code blocks)

@mjbvz mjbvz closed this as completed Jun 24, 2020
@mjbvz mjbvz added *duplicate Issue identified as a duplicate of another issue(s) languages-diagnostics Source problems reporting labels Jun 24, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Aug 8, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*duplicate Issue identified as a duplicate of another issue(s) languages-diagnostics Source problems reporting
Projects
None yet
Development

No branches or pull requests

3 participants