Open surjithctly opened 3 years ago
I've the same problem. This can be pretty problemtatic if you have different formatting rules per language.
In the meanwhile I will probably use https://marketplace.visualstudio.com/items?itemName=ginfuru.better-nunjucks. It support front matter detection.
Describe the bug Frontmatter inside njk (nunjucks) is formatted as gray comment color.
To Reproduce Steps to reproduce the behavior:
---
Expected behavior It works fine on markdown![image](https://user-images.githubusercontent.com/1884712/90778714-982d9380-e31a-11ea-9775-d793bd8d4904.png)
Screenshots but not on .njk file![image](https://user-images.githubusercontent.com/1884712/90778536-5ef52380-e31a-11ea-99b5-408c4bf1a941.png)
I have contacted material theme. But they says: https://github.com/material-theme/vsc-material-theme/issues/497
This is an issue related to the nunjucks language highlights. As you can see, the MD language extension assign the correct (YAML) tokens to the front-matter elements:
While the nunjucks language extension doesn't assign any specific token, so vscode uses the text color fallback: