Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add rmarkdown (or knitr) mode to shinyAce #24

Open
sjmgarnier opened this issue Jan 4, 2015 · 4 comments
Open

Add rmarkdown (or knitr) mode to shinyAce #24

sjmgarnier opened this issue Jan 4, 2015 · 4 comments

Comments

@sjmgarnier
Copy link

I'm currently working on a rmarkdown editor with instant preview using shinyAce (code at swarm-lab/editR). It works great and it is very easy to set up. Thank you for this.

My problem is that if I use aceEditor in markdown mode, R code chunks don't get syntax highlighting or automated indentation like RStudio does for instance. Do you plan on creating a rmarkdown (or knitr) mode for shinyAce (or for Ace more generally)?

@trestletech
Copy link
Owner

You're quite welcome. And I really like your app! I may use that in the future when doing Rmd.

Unfortunately the Ace syntax highlighting for R is not Rmarkdown-aware. The "proper" implementation here is, of course, RStudio IDE. And they do use Ace and have all the syntax highlighters that you're looking for.

Unfortunately, due to the licensing discrepancies between the two projects (GPL3 for RStudio, MIT for shinyAce), we wouldn't be able to pull in their syntax highlighters, if I understand the legal stuff there. So until I (or a generous pull requester ;) ) were to rewrite the hundreds/thousands of lines that went into RStudio's rmarkdown syntax highlighting system, I don't foresee shinyAce being able to support this feature.

I'll leave it open as a request, but I don't see a reasonable approach forward at the moment, unfortunately.

@sjmgarnier
Copy link
Author

No problem. After reading similar requests online I figured it was not a trivial thing to do.

As for the legal thing of integrating RStudio code in yours, this chart pretty much sums it up I think, unfortunately. Oh well...

@rubenarslan
Copy link

There's actually a pull request for mixed mode support including R, but it's 3 years old. Here's the relevant ace issue for those who're looking ajaxorg/ace#1792

@vnijs
Copy link
Collaborator

vnijs commented Apr 2, 2018

Would be great to have this feature. A PR would be great

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants