hasit / vscode-plush

Plush syntax support for VSCode
MIT License
1 stars 2 forks source link

Syntax Highlighting #2

Open duckbrain opened 5 years ago

duckbrain commented 5 years ago

To allow syntax highlighting we will need to define the plush language in VSCode and a grammar to do the parsing.

I've started experimenting with this on our branch: https://github.com/ec2-software/vscode-plush/tree/language-support. I don't know what I'm doing, but it is matching and autoclosing <%= %> and <% %> tags and it uses HTML to highlight.

I'm thinking we'll need two languages. One being the plush template language, and the other being the plush script language. .fizz files are Plush scripts, .html and .plush are Plush templates.

I've been trying to get examples from https://github.com/Microsoft/vscode/tree/master/extensions, mainly PHP, HTML, and JavaScript. I think a good first iteration, could be getting it to highlight Plush like it's JavaScript, and get the templates to highlight inside of <% %> tags.

duckbrain commented 5 years ago

I don't think I'll be able to devote too much more time, but I wanted to make my research and results public, because this would make Buffalo much nicer on VScode.