GithubHelp home page GithubHelp logo

Comments (7)

edheltzel avatar edheltzel commented on September 24, 2024

@michael-proulx That's interesting... I'm assuming the file extension is either html or njk ?

from nunjucks-for-visual-studio-code.

michael-proulx avatar michael-proulx commented on September 24, 2024

Yes it's index.njk

from nunjucks-for-visual-studio-code.

edheltzel avatar edheltzel commented on September 24, 2024

@michael-proulx

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.

edheltzel avatar edheltzel commented on September 24, 2024

@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.

michael-proulx avatar michael-proulx commented on September 24, 2024

Nice thank you !! :)

from nunjucks-for-visual-studio-code.

munael avatar munael commented on September 24, 2024

As of the current version, I see something like this:
image

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.
image

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.

edheltzel avatar edheltzel commented on September 24, 2024

As of the current version, I see something like this: image

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. image

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)

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.