Syntax Highlighting for embedded languages within JSON and JSONC files.
It does so by overriding the default JSON and JSONC languages and assigning a scopeName to each object with the form .meta.embedded.objectkey..
Then using multiple injection grammars that target those scopeNames and inject specific languages into it.
-
when-clause-contexts within
"when"forpackage.jsonandkeybindings.json(JSON)

-
JSON escaped JavaScript Regular Expressions within
"wordPattern","folding","onEnterRules"and"indentationRules"forlanguage-configuration.json(JSONC)

-
Snippets, Regex and Markdown within
"defaultSnippets","pattern"and"markdownDescription"for.schema.json(JSON)
Recommend the Snippets Snippets extension

-
Glob patterns within
"filenamePatterns"and"fileMatch"forpackage.json
This extension targets every JSON and JSONC file, not just package.json.
There will be false positives and false negatives.
Please report any issues you come across.
VSCode TextMate injections are rather slow.
It may take longer for documents to fully syntax highlight.
The "injectionSelector" for regexp is almost 10,000 characters long.
- The GitHub Issue that spawned the idea
- Github Repository
- VSCode Marketplace
- Related extensions:
- Support args
- Improve performance
- Fix false positives
