GithubHelp home page GithubHelp logo

Comments (3)

edheltzel avatar edheltzel commented on June 26, 2024

Hi @danieledep - do you have any code examples for me to try out?

The way the grammar is injected might be causing a conflict, with Liquid or vice-versa. I'm not sure if your use case calls for both template languages to be used, but I generally just activate Better Nunjucks on a per-workspace basis, I assume that is the case... if you're trying to use Better Nunjucks for .liquid files then, yeah it would break.

I do know that Eleventy supports the use of multiple templating languages at the same time with their render plugin which could be justification to include other grammars inside of Better Nunjucks, but I am on the fence with that for this extension. It would probably be best to create a new extension.

from nunjucks-for-visual-studio-code.

danieledep avatar danieledep commented on June 26, 2024

Sorry i didn't make it clear that i use .liquid files for work where the only templating language is liquid and use the Shopify plugin for those.

In the meantime i wanted to use Nunjacks for personal projects where the only templating language is going to be Nunjacks and i preferred the way Better Nunjacks highlighted. So i have no projects which uses both.

That said after installing Better Nunjacks i noticed some liquid highlighting would break in liquid files:
Screenshot 2023-01-06 at 12 01 26
and it went back working normally after disabling Better Nunjacks.

Of course enable and disable Better Nunjacks on a workspace basis could be a solution but i don't usually do that, for now i'm using other extensions for nunjacks files that don't mess with liquid files

from nunjucks-for-visual-studio-code.

edheltzel avatar edheltzel commented on June 26, 2024

I'm not 100% sure how the Liquid extension in VSCode works, but it's probably similar to how it injects into the default HTML grammar. I'll have to take a look at it more in-depth to be sure.

So as of right now, the best workaround is to enable based on workspace.

from nunjucks-for-visual-studio-code.

Related Issues (10)

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.