vscode extensions - Can I Extend an Existing Colorizer or Language in VS Code -
what i'd create extension extends html support - html support , more, includes following:
- syntax highlighting (colorizer)
- intellisense
- format html
- emmet snippets
these details listed on page html programming in vs code
ultimately create extension supports liquid templating syntax highlighting , auto complete.
i've gotten #1 work on it's own colorizer, , #2 can accomplished through language server.
since liquid expressions inserted html documents, plugin should built top of/extend html support rather override it. possible?
it doesn't possible extension. looking @ source code src\vs\languages\html\common
, if want extend existing built in language support, can create class extension.
for example, handlebars
language support extension of html
, implemented thusly:
// handlebars.ts import htmlmode = require('vs/languages/html/common/html'); export class handlebarsstate extends htmlmode.state { ... } export class handlebarsmode extends htmlmode.htmlmode<htmlworker.htmlworker> { ... }
so in particular case, i'll either want extend html or handlebars (i haven't determined makes more sense yet) in order add liquid
language support.
Comments
Post a Comment