开发者

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 plai开发者_如何学编程n 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.


If creating your own plugin is to hard, you might be already content if mustache templates are displayed as (normal) HTML instead of plain text.

This can be configured in Options > Miscellaneous > Files. Create a 'New' file extension named 'mustache'. Than select 'HTML Files (text/html)' as associated file type.


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.


I think better is to open this files as text/x-twig.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜