Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/elisherer/monaco-languages-jq
monaco-languages-jq
https://github.com/elisherer/monaco-languages-jq
Last synced: about 5 hours ago
JSON representation
monaco-languages-jq
- Host: GitHub
- URL: https://github.com/elisherer/monaco-languages-jq
- Owner: elisherer
- License: mit
- Created: 2021-04-06T06:21:10.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-04-06T06:48:53.000Z (over 3 years ago)
- Last Synced: 2024-11-13T11:41:03.680Z (2 days ago)
- Language: JavaScript
- Size: 4.88 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# monaco-languages-jq · [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/elisherer/monaco-languages-jq/blob/master/LICENSE) [![npm version](https://img.shields.io/npm/v/monaco-languages-jq.svg?style=flat)](https://www.npmjs.com/package/monaco-languages-jq) ![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)
[Monaco Editor](https://github.com/microsoft/monaco-editor) JQ language definition (and syntax highlight)
## Installation
- `npm i -S monaco-languages-jq`
## Usage
With a helper function to register straight to monaco
```js
// `monaco` should be global or local in the loading moduleimport { registerJQLanguageDefinition } from 'monaco-languages-jq';
...
registerJQLanguageDefinition(monaco);
```DIY (in case you want it to be called some other name):
```js
// `monaco` should be global or local in the loading moduleimport { JQLanguageDefinition } from 'monaco-languages-jq';
...
// Register a new language
monaco.languages.register({ id: 'jq' });// Register a tokens provider for the language
monaco.languages.setMonarchTokensProvider('jq', JQLanguageDefinition);
```In monaco editor use `"jq"` (or your value if changed) as `language`.
## License
monaco-languages-jq is [MIT Licensed](https://github.com/elisherer/monaco-languages-jq/blob/master/LICENSE)