|
1 | 1 | # JSON Embedded Languages |
| 2 | +Syntax Highlighting for embedded languages within `JSON` and `JSONC` files. |
| 3 | +It does so by overriding the default `JSON` and `JSONC` languages and assigning scopeNames to objects with the form `.meta.embedded.object-key-name.`. |
| 4 | +Then using multiple injection grammars that target and inject specific languages into it. |
| 5 | + |
2 | 6 |
|
3 | 7 | ## Features |
| 8 | +* ShellScript within `"scripts"` for `package.json` (`JSON`) |
| 9 | + Requires the builtin `ShellScript` extension or [better-shell-syntax](https://marketplace.visualstudio.com/items?itemName=jeff-hykin.better-shellscript-syntax) |
| 10 | + |
4 | 11 |
|
5 | | -Syntax Highlighting for ShellScript language within `package.json` `"scripts"`. |
6 | | - |
| 12 | +* Regular Expressions within `"wordPattern"`, `"folding"`, `"onEnterRules"` and `"indentationRules"` for `language-configuration.json` (`JSONC`) |
| 13 | + Requires [JSON TextMate](https://marketplace.visualstudio.com/items?itemName=RedCMD.tmlanguage-syntax-highlighter) extension |
| 14 | + |
7 | 15 |
|
| 16 | +* Snippets, Regex and Markdown within `"defaultSnippets"`, `"pattern"` and `"markdownDescription"` for `.schema.json` (`JSON`) |
| 17 | + Requires the builtin `JSON Snippets` extension or [Snippets Snippets](https://marketplace.visualstudio.com/items?itemName=RedCMD.snippets-snippets), [JSON TextMate](https://marketplace.visualstudio.com/items?itemName=RedCMD.tmlanguage-syntax-highlighter) and the builtin `Markdown` extension |
| 18 | + |
8 | 19 |
|
9 | | -## Known Issues |
10 | 20 |
|
11 | | -This extension targets every JSON file, not just `package.json`. |
12 | | -However only a root level `"scripts"` object is affected. |
| 21 | +## Known Issues |
13 | 22 |
|
| 23 | +This extension targets every `JSON` and `JSONC` file, not just `package.json`. |
| 24 | +There will be false positives and false negatives. |
| 25 | +Please report any you come across. |
14 | 26 |
|
15 | | ---- |
16 | 27 |
|
17 | 28 | ## For more information |
18 | 29 |
|
19 | 30 | * The GitHub [Issue](https://github.com/microsoft/vscode/issues/224581) that spawned the idea |
20 | | -* https://github.com/jeff-hykin/better-shell-syntax/issues/100 |
21 | 31 | * [Repository](https://github.com/RedCMD/JSON-Embedded-Languages) |
22 | | -* [Marketplace](https://marketplace.visualstudio.com/items?itemName=RedCMD.json-embedded-languages) |
| 32 | +* [Marketplace](https://marketplace.visualstudio.com/items?itemName=RedCMD.json-embedded-languages) |
0 commit comments