Giter Club home page Giter Club logo

Comments (4)

calumbrodie avatar calumbrodie commented on August 23, 2024

Edit: I see from reading the readme this may be by design: In which case this could be tagged as an enhancement.

from handlebars.

daaain avatar daaain commented on August 23, 2024

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.

calumbrodie avatar calumbrodie commented on August 23, 2024

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.

calumbrodie avatar calumbrodie commented on August 23, 2024

Added a separate PR - will close this.

from handlebars.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.