-
Notifications
You must be signed in to change notification settings - Fork 29.4k
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
Injection grammars with embeddedLanguages #34316
Labels
api
grammar
Syntax highlighting grammar
verification-needed
Verification of issue is requested
verified
Verification succeeded
Milestone
Comments
mjbvz
added a commit
to mjbvz/vscode
that referenced
this issue
Sep 13, 2017
Fixes microsoft#34316 Enables contributed injection grammars to specify an embedded language for their injection targets: ```json "grammars": [ { "scopeName": "meta.embedded.css", "path": "./syntaxes/injection.json", "injectTo": [ "source.js", "source.jsx", "source.ts", "source.tsx" ], "embeddedLanguages": { "meta.embedded.css": "css" } } ] ```
mjbvz
added a commit
that referenced
this issue
Sep 18, 2017
Fixes #34316 Enables contributed injection grammars to specify an embedded language for their injection targets: ```json "grammars": [ { "scopeName": "meta.embedded.css", "path": "./syntaxes/injection.json", "injectTo": [ "source.js", "source.jsx", "source.ts", "source.tsx" ], "embeddedLanguages": { "meta.embedded.css": "css" } } ] ```
To verify, try creating a new injection grammar such as:
with contributes:
This will highlight: ```superjs
1 + 1
``` blocks in markdown. Try adding |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
api
grammar
Syntax highlighting grammar
verification-needed
Verification of issue is requested
verified
Verification succeeded
Problem
I'm trying to write an injection for css grammar into JS/TS template strings. The following injection works, the
embeddedLanguages
property does not seem to be observed for injectionsThe text was updated successfully, but these errors were encountered: