Vscode-r: [Feature request] Support highlighting for yaml front matter of Rmarkdown document

Created on 17 May 2018  路  11Comments  路  Source: Ikuyadeu/vscode-R

.Rmd is now well highlighted in the main document, but there is no support for highlighting for yaml front matter. Will it be supported in the future?

help wanted highlighting

All 11 comments

@psychelzh Thank you for using and issue.
Looks little difficult, but actually it should be supported by this extension.
I put this as want help

Thanks. And I also filed an issue (Microsoft/vscode#49604) in vscode. Hopefully it will be solved there?

Yes, I think so.

It might be possible to handle this as an Embedded Language: https://code.visualstudio.com/api/language-extensions/syntax-highlight-guide#embedded-languages

But I do believe this is supported in newer versions of vscode. See the following screenshots.

image

@psychelzh Thank you for pointing this out! I hadn't realised this was supported at all. I checked just now and found that on Linux it is indeed highlighted, but on Windows there is no highlighting even with VSCode 1.40.

Check of the highlighting info on Windows:

---
title: "highlighting test"
author: "me"
---

**Text!**

# Hello

yaml-windows

Linux:

yaml-linux

Windows and Linux are showing the front matter as different languages. Not sure why this would be.

@andycraig Interestingly, I am using Windows 10 now, which is normal.馃槺

@psychelzh Oh! In that case it is almost certainly something specific to my system. I鈥檒l try reinstalling VSCode etc. Thank you for letting me know!

It's confirmed working on both Linux and Windows, and whatever problem I'm having on Windows is probably related to VSCode rather than vscode-R, so let's close this.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Victsz picture Victsz  路  5Comments

Nightwingg picture Nightwingg  路  6Comments

maxheld83 picture maxheld83  路  4Comments

JimmyZJX picture JimmyZJX  路  3Comments

gcambray picture gcambray  路  4Comments