Search code examples
netbeanssyntaxmustache

Is There Mustache Syntax Highlighter Or Plugin For NetBeans?


There are such thing as Mustache. I'm using NetBeans and I need to edit .mustache files. The problem is that when I open it using NetBeans, syntax is just like for plain text.

1) Is it possible to have HTML-like syntax for .mustache files?

2) Is there any plugin that allows to work easier with Mustache? I have found only this tutorial.


Solution

  • It seemes that the way described at the link you've posted is only way: write your own plugin for netbeans (it's quite difficult task)

    1) Follow http://wiki.netbeans.org/SyntaxColoringANTLR

    2) But the more difficult thing is to implement your language definition as an embedded one.

    It's needed if you want to highlight mustache template tags inside other language files (html, xhtml)

    In older versions of NetBeans was a really simple api and module (it cannot be itegrated with all the platform services, like refactoring and so on) but it was based on grammar definition (BNF or something like that) and color scheme for tokens.