Comments (7)
@michael-proulx That's interesting... I'm assuming the file extension is either html
or njk
?
from nunjucks-for-visual-studio-code.
Yes it's index.njk
from nunjucks-for-visual-studio-code.
I have a working modification that extends the YAML support so the highlighting does not break.
As of right now, this is more of a workaround, since I just included some regex to accommodate 11ty's custom frontmatter.
better-nunjucks-11ty-custom-front-matter.mp4
from nunjucks-for-visual-studio-code.
@michael-proulx
I'll do some more research on how to add additional syntax highlighting for embedded grammars like json
/toml
/js
but right now I don't know if there is a way to do this inside of frontmatter.
from nunjucks-for-visual-studio-code.
Nice thank you !! :)
from nunjucks-for-visual-studio-code.
As of the current version, I see something like this:
When the specified language is HTML: Only the frontmatter has syntax highlighting. (It's a monochrome theme, but still.)
When the specified language is Nunjucks: Highlighting more broken.
Plus tooltips for HTML tags no longer work. I've added the emmet
configs mentioned in multiple extensions but can't be sure this's even meant to re0enable tooltips or something else entirely.
from nunjucks-for-visual-studio-code.
As of the current version, I see something like this:
When the specified language is HTML: Only the frontmatter has syntax highlighting. (It's a monochrome theme, but still.)
When the specified language is Nunjucks: Highlighting more broken.
Plus tooltips for HTML tags no longer work. I've added the
emmet
configs mentioned in multiple extensions but can't be sure this's even meant to re0enable tooltips or something else entirely.
@munael Could you provide me a little more context or the file you're trying to get syntax highlighting working from the looks of it you're trying to use XML and change the grammar to Nunjucks, is that accurate?
Also, your YAML is not valid from the screenshots:
it should be:
---
title: Giffleball
images:
- ???.jpg
- ,,,.jpg
- parrot.gif
---
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 highlight on other languages HOT 3
- 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.