monaco-languages-jq
v1.0.0
Published
Monaco Editor JQ language definition (and syntax highlight)
Downloads
3,298
Maintainers
Readme
monaco-languages-jq ·
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
// `monaco` should be global or local in the loading module
import { registerJQLanguageDefinition } from 'monaco-languages-jq';
...
registerJQLanguageDefinition(monaco);
DIY (in case you want it to be called some other name):
// `monaco` should be global or local in the loading module
import { 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