Syntax highlighting for .pug files


#1

I noticed .jade files have syntax highlighting in the editor while .pug files do not.
The syntax differences look fairly minimal, https://github.com/pugjs/pug/issues/2305
Would it be easy enough to enable the highlighting for .pug files?


#2

Yeah it sounds like a small matter of editor language aliasing, i’ll look into it asap

thx!


#3

Deployed a fix, check it out :slight_smile:


#4

Nice! That was fast :thumbsup:


#5

Similarly, could we alias .hbs / .handlebars for HTML-ish syntax highlighting?


#6

Handlebars highlighting done too :slight_smile:


#7

Do we have to do something to enable handlebars highlighting? For me everything in foo.hbs is black except for the brackets {{…}}. Or maybe I misunderstand what it does? I expect the file to be highlighted the same as HTML, with something added for the handlebars.

handlebars – Glitch https://glitch.com/edit/#!/thread-pickle?path=views/index.handlebars


#8

same. @etamponi any chance you guys can use the codemirror handlebars highlighter?


#9

We’re looking into the cause of the problem, hope to get it fixed up soon!


#10

And handlebars code highlighting is fixed!


#11

amazing response time, thank you!


#12

Continuing the list of desiderata for syntax highlighting of template languages: could we have some extensions to trigger jinjia-like syntax-highlighting? I tried .jinja, .jinja2, .twig, .django, .njk to no avail.

Thanks