microsoft / RTVS

R Tools for Visual Studio.
MIT License
389 stars 118 forks source link

Rmarkdown code chunks marked {foo} are not always R #4309

Open hongooi73 opened 6 years ago

hongooi73 commented 6 years ago

Rmarkdown has the ability to run multiple execution engines, which you specify in the chunk header like ```{python}, ```{SQL} etc. However, RTVS treats any code chunk with {foo} in the header as R:

image

In this pic, the code in the chunk is actually C++, but RTVS thinks it's R and highlights syntax errors as such.

Adding full syntax highlighting/Intellisense for every language is probably out of the question, but it shouldn't be too hard to tell RTVS simply to turn off R highlighting.