addons/shared/textmate-lib/README.mdblame
View source
b69ab311# textmate-lib
b69ab312
b69ab313This is an attempt to create a reusable Node.js module for working
b69ab314with a corpus of TextMate grammars and leveraging them to tokenize
b69ab315source code so it can be syntax highlighted in the browser in a way
b69ab316that is consistent with VS Code.
b69ab317
b69ab318As a user of this library, you have to:
b69ab319
b69ab3110- Successfully call `loadWASM()` from `vscode-oniguruma`.
b69ab3111- Provide your own `IRawTheme` (as defined in `vscode-textmate`).
b69ab3112- Provide your own map of scope name to `Grammar` where `Grammar` is an
b69ab3113 interface that determines how to fetch TextMate grammar data (in either
b69ab3114 JSON or plist format).
b69ab3115
b69ab3116The specifics of how you satisfy these requirements are likely tied to how
b69ab3117you load static resources in your web application.