-
Notifications
You must be signed in to change notification settings - Fork 30k
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
Native syntax highlighting in javascript template literals #229297
Labels
*extension-candidate
Issue identified as good extension implementation
Comments
mjbvz
added
the
*extension-candidate
Issue identified as good extension implementation
label
Sep 23, 2024
We try to keep VS Code lean and we think the functionality you're asking for is great for a VS Code extension. Maybe you can already find one that suits you in the VS Code Marketplace. Just in case, in a few simple steps you can get started writing your own extension. See also our issue reporting guidelines. Happy Coding! |
vs-code-engineering
bot
closed this as not planned
Won't fix, can't repro, duplicate, stale
Sep 23, 2024
This comment has been minimized.
This comment has been minimized.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Feature Description
See MDN template literals.
Template literals are currently displayed like this:
Let's make template literals appear like this:
In recent years, many web developers have needed this feature. Here are examples of projects known to me that require this feature:
Many of these projects come up with their own ways of highlighting the syntax of template literals, but in all known implementations this does not work well.
Even if you can turn on syntax highlighting inside a template literal, formatting, tabulation, auto-substitutions, and transitions to definitions still do not work.
In some cases, these solutions break the syntax highlighting of javascript code.
Here are examples of these solutions:
Feature implementation details
Unlike Markdown, PHP, and HTML, Javascript syntax does not explicitly define the language of a template literal.
Therefore, I assume that a meta attribute will have to be added to jsdoc and tsdoc to explicitly determine the
language
of the template literal:Details of the technical implementation of the feature
Perhaps to fully implement this feature you will need to use tree-sitter (#50140)
The text was updated successfully, but these errors were encountered: