Comments (3)
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.
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:
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.
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 (13)
- Nunjucks Style Comments HOT 10
- Possible to use on other grammar instead of HTML? HOT 5
- renderTemplate snippet opening tag is output as "renderTemplatender" HOT 3
- property value expected and at-rule or selector expected HOT 1
- Formatting Indentation HOT 1
- Syntax Highlighting treating md's `---` as Frontmatter HOT 4
- Bug: Indented YAML Frontmatter does not retain indention HOT 5
- Frontmatter "breaks" extension HOT 10
- Default to HTML comment when outside of Nunjucks snippets in Markdown files HOT 3
- Syntax Highlighting HOT 7
- No response or How to use with .md file HOT 2
- add option for comment style HOT 3
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 nunjucks-for-visual-studio-code.