Cmdstanr and rstudio stan syntax highlighting

Is it possible to have rstudio stan syntax up-to-date with the newest Stan version when using cmdstanr?

1 Like

Hi,

rstudio currently requires and uses rstan for syntax checking. There is currently no way of using cmdstan( r ) for syntax checking.

I am not sure what the requirements are for also supporting stanc3 via cmdstan( r ) but I am guessing the minimum requirement for that is that cmdstanr is available on CRAN. @bgoodri should know more.

1 Like

RStudio uses the language definition in rstan, specifically

But we haven’t been able to get rstan beyond the Stan 2.19 branch, no so much due to stanc3 but due to the CRTP and some non-deterministic compiler behavior.

2 Likes

@rok_cesnovar @bgoodri Thanks for the info! Is it possible to add this txt file to cmdstanr with the updated 2.22.1 definitions?

First,

needs to get merged so that the text file can be updated for subsequent Stan versions. It is simple to include in the cmdstanr sources, but it is not simple for RStudio to know that it exists. The RStudio IDE actually looks up the functions in the data.frame called rstan:::rosetta that is made from that text file.

2 Likes

Just trying to follow this thread as the emacs stan-mode depends on the same file in the rstan repo. https://github.com/jrnold/stan-language-definitions