Skip to content

Improve Scriban syntax highlighting in Template editor #59

@NeilMacMullen

Description

@NeilMacMullen

If we move to Monaco for the template window as in #42 it ought to be possible to use Scriban syntax colouring. Technically we could implement this in AvalonEdit as well but it's probably easier in Monaco. There is a VS-Code extension which does this but it is not quite in the same format as the Monaco basic-languages js files. It seems like there ought to be a tool that transforms the extension files into native Monaco js configurations but if there isn't it could be done partially by hand.

It looks like https://github.com/scriban/scriban-vscode/blob/master/language-configuration.json needs to be pasted into a new js file in the exports.conf section. The exports.language section is mostly generic parser rules but things like keyword lists would obviously differ and it's likely some of the regex rules would change.... Plus there is the difficulty of coping with mixes of scriban and text - the vs code highlighter does this by having a number of variants depending on what the target format is.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions