Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Scriban syntax highlighting in Template editor #59

Open
NeilMacMullen opened this issue Feb 3, 2021 · 1 comment
Open

Improve Scriban syntax highlighting in Template editor #59

NeilMacMullen opened this issue Feb 3, 2021 · 1 comment
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@NeilMacMullen
Copy link
Owner

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.

@NeilMacMullen NeilMacMullen added enhancement New feature or request help wanted Extra attention is needed labels Feb 3, 2021
@NeilMacMullen
Copy link
Owner Author

NeilMacMullen commented Feb 7, 2021

There is now a scriban.js syntax file that was originally based on the csharp syntax but it really needs extensive work to provide a good experience.

@NeilMacMullen NeilMacMullen changed the title Add Scriban syntax highlighting to Template window Improve Scriban syntax highlighting in Template editor Feb 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant