Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
RedCMD committed Dec 24, 2024
1 parent d51d829 commit f938eec
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 8 deletions.
26 changes: 18 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,32 @@
# JSON Embedded Languages
Syntax Highlighting for embedded languages within `JSON` and `JSONC` files.
It does so by overriding the default `JSON` and `JSONC` languages and assigning scopeNames to objects with the form `.meta.embedded.object-key-name.`.
Then using multiple injection grammars that target and inject specific languages into it.


## Features
* ShellScript within `"scripts"` for `package.json` (`JSON`)
Requires the builtin `ShellScript` extension or [better-shell-syntax](https://marketplace.visualstudio.com/items?itemName=jeff-hykin.better-shellscript-syntax)
![Example `package.json`](images/Example-Scripts.png)

Syntax Highlighting for ShellScript language within `package.json` `"scripts"`.
![Example `package.json` code](images/Example.png)
* Regular Expressions within `"wordPattern"`, `"folding"`, `"onEnterRules"` and `"indentationRules"` for `language-configuration.json` (`JSONC`)
Requires [JSON TextMate](https://marketplace.visualstudio.com/items?itemName=RedCMD.tmlanguage-syntax-highlighter) extension
![Example `language-configuration.json`](images/Example-language-configuration.png)

* Snippets, Regex and Markdown within `"defaultSnippets"`, `"pattern"` and `"markdownDescription"` for `.schema.json` (`JSON`)
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
![Example `schema.json`](images/Example-schema.png)

## Known Issues

This extension targets every JSON file, not just `package.json`.
However only a root level `"scripts"` object is affected.
## Known Issues

This extension targets every `JSON` and `JSONC` file, not just `package.json`.
There will be false positives and false negatives.
Please report any you come across.

---

## For more information

* The GitHub [Issue](https://github.com/microsoft/vscode/issues/224581) that spawned the idea
* https://github.com/jeff-hykin/better-shell-syntax/issues/100
* [Repository](https://github.com/RedCMD/JSON-Embedded-Languages)
* [Marketplace](https://marketplace.visualstudio.com/items?itemName=RedCMD.json-embedded-languages)
* [Marketplace](https://marketplace.visualstudio.com/items?itemName=RedCMD.json-embedded-languages)
File renamed without changes
Binary file added images/Example-language-configuration.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/Example-schema.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit f938eec

Please sign in to comment.