Comments (4)
Edit: I see from reading the readme this may be by design: In which case this could be tagged as an enhancement.
from handlebars.
I haven't heard of Twig yet, but on a quick research it seems that it supports multiple template systems? If that's the case I wouldn't want to hardcode the file type association into the Handlebars package as people who use other templates would be really annoyed that the wrong package is trying to handle their files :) Can you name you file .twig.handlebars?
As for using it inside a HTML script tag, that's a change in the HTML package. It would need to understand that the tag contains Handlebars and load the language definition. I'm not even sure if that package is on Github, if you find it I can try to work with whoever is maintaining it :)
from handlebars.
I guess the html scoping is handled by sublime natively. The scope within a script tag (embedded) is:
text.html.basic source.js.embedded.html
This seems like a narrow enough scope I think? Where there are conflicts in autocompletion (for example 'if'), between raw js and handlebars, ST2 usually displays both options in a dropdown menu. I think this would be acceptable (what do you reckon?)
edit: Similar issue in jQuery snippets bundle - with relevant commit:
aaronpowell/sublime-jquery-snippets#1
As for twig - Is it possible to only enable if the file extension is 'handlebars.twig' rather than just '.twig' (you are right re: twig supporting multiple template systems). I wouldn't want to change the file extension as .twig is an extension which requires compiling (It's a handlebars file written IN twig rather than the inverse).
Cheers
from handlebars.
Added a separate PR - will close this.
from handlebars.
Related Issues (20)
- @index为undefined HOT 3
- [vscode] strange behaviour with else if and () subexpressions HOT 2
- Poor syntax highlighting HOT 1
- $(function {}) syntax highlighting failed HOT 4
- How to set key binding for comments? (Sublime Text) HOT 1
- Syntax highlighting glitch
- Escaping of mustaches ignored
- Sublime download error: HTTP exception InvalidCertificateException HOT 2
- Using Handlebar expression in <script> blocks breaks syntax highlighting in Sublime HOT 6
- Syntax Highlighting Error ... or No Error? HOT 7
- [Sublime Text 3] Handlebars Syntax not applied on .hbs file open HOT 10
- "Partial block" syntax highlighting HOT 1
- Incorrect highlighting with quotes and dollar signs HOT 3
- Deactivates Sublime's Default HTML Keyboard Shortcuts HOT 2
- / character breaks from block highlight HOT 2
- Improve coloring of block expressions HOT 4
- Code formatting support. HOT 1
- Not working in vscode HOT 3
- Review block expression opening and closing tag colours
- syntax highlighting is lost after call to handlebars helper with string parameter inside script block HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from handlebars.