Closed holgerbrandl closed 7 years ago
@holgerbrandl, I will add a configuration option to allow user defined fenced code info string to IDE language mapping. In this case a regex of ^\{r(?:\w|\})
to r
will accomplish this.
I had this in mind since the beginning but never got around to implementing it. Currently there are a couple of hardcoded maps which I will move to default map definition.
@holgerbrandl, I hardcoded the r code chuck logic for now. Will take anything that equals or starts with {r
that is not followed by an identifier character.
The UI implementation would take longer than I wanted to spend and this was causing the delay in implementation.
EAP released.
thanks a ton. Works great.
Hey - could you please clarify: do I need to define a language injection for rmarkdown or is it meant to work once the R language support plugin is installed?
Currently have associated .rmd with Markdown, but not seeing any syntax highlighting etc. on the Rmarkdown code chunks.
If I do need to define a language injection - would you be able to share a screenshot of the settings used/attach a file defining it?
Registering the file Rmd type is the correct first step. You'd also need the r language plugin for highlighting and completion.
No need to define anything custom, nor do you need any special settings.
Would it be possible to auto-inject r also if code chunks start with ```{r ?
This is because in the Rmarkdown format (which is the most popular literal programming mechanism for R) code chunks start like that. See here for examples.