Currently I'm working on a Project with Handlebars (JS Template Engine) and I'm using eclipse for development. The problem is, that eclipse doesn't offer syntax highlighting for my Handlebars-Templates. My Templates are enclosed in tags. Syntax highlighting in works as expected.
Screenshot:
Is it possible, that Eclipse also highlights this code (at the best with HTML Syntax Coloring)?
Suggestion: for html/templateit could be an extension of the default html syntax highlighting for VSCode, capable of highlighting both HTML and code inside {{ }}on HTML template files. The highlighting could be activated for files with extensions: .gohtmlor .go.html .gotmplor .go.tmpl Sorry, something went wrong. Copy link
If you are using .js extension, copy apis.sah from <SAHI_INSTALL_FOLDER>/userdata/scripts into the scripts folder in the project and rename it as apis.js. Open any .js (or .sah) file from the JavaScript project, and you should be able to see Syntax highlighting.
It would be great to have html/templateextend VS Code's HTML syntax highlighting and add support for Go's default tags {{and }}and the logic in between them. The text was updated successfully, but these errors were encountered:
Press OK on the Templates window. SahiEclipseEditorTemplates.xml has now been successfully imported. To make use of any template, type the first few letters of the template and press Ctrl + Space to bring up the template proposal. Here are a few examples.
If you are using PHP
, you can fool Eclipse by adding empty php tag:
<scrip<?php ?>t type="tmpl_handlebars" id="tmpl_places">
<article>
<h1>
...
</h1>
</article>
</script>
You would have to find a plug-in which supports that template engine. The HTML Editor provided by Eclipse uses the value of the type/language attributes to find the classes that provide syntax coloring, content assist, etc. The possibility is there, but out of the box, it only provides for JavaScript.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With