Skip to content

Commit c7d5760

Browse files
committed
Update readme
1 parent 210f1d3 commit c7d5760

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

README.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,21 @@
11
# JSON Embedded Languages
22
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.
3+
It does so by overriding the default `JSON` and `JSONC` languages and assigning a scopeName to each object with the form `.meta.embedded.objectkey.`.
4+
Then using multiple injection grammars that target those scopeNames and inject specific languages into it.
55

66

77
## Features
88
* 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-
![Example `package.json`](images/Example-Scripts.png)
9+
![Example `package.json/scripts`](images/Example-scripts.png)
1110

1211
* [when-clause-contexts](https://code.visualstudio.com/api/references/when-clause-contexts) within `"when"` for `package.json` (`JSON`)
1312
![Example `package.json/when`](images/Example-when.png)
1413

15-
* Regular Expressions within `"wordPattern"`, `"folding"`, `"onEnterRules"` and `"indentationRules"` for `language-configuration.json` (`JSONC`)
16-
Requires [JSON TextMate](https://marketplace.visualstudio.com/items?itemName=RedCMD.tmlanguage-syntax-highlighter) extension
14+
* JSON escaped JavaScript Regular Expressions within `"wordPattern"`, `"folding"`, `"onEnterRules"` and `"indentationRules"` for `language-configuration.json` (`JSONC`)
1715
![Example `language-configuration.json`](images/Example-language-configuration.png)
1816

1917
* Snippets, Regex and Markdown within `"defaultSnippets"`, `"pattern"` and `"markdownDescription"` for `.schema.json` (`JSON`)
20-
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+
Recommend the [Snippets Snippets](https://marketplace.visualstudio.com/items?itemName=RedCMD.snippets-snippets) extension
2119
![Example `schema.json`](images/Example-schema.png)
2220

2321

@@ -27,6 +25,10 @@ This extension targets every `JSON` and `JSONC` file, not just `package.json`.
2725
There will be false positives and false negatives.
2826
Please report any you come across.
2927

28+
VSCode TextMate injections are rather slow.
29+
It may take longer for documents to fully syntax highlight.
30+
The `regexp` `"injectionSelector"` is almost 10,000 characters long.
31+
3032

3133
## For more information
3234

@@ -37,3 +39,4 @@ Please report any you come across.
3739

3840
## TODO:
3941
* `globs`/`"filenamePatterns"`
42+
* Improve performance
-48.3 KB
Loading

images/Example-schema.png

56.8 KB
Loading

0 commit comments

Comments
 (0)