Non-R (SQL/Python) Chunk Completion

Is it possible to have auto-completion for non-R code chunk in RMarkdown? I am specifically interested in implementing SQL chunk completion. If you can provide a simple entry point in RStudio, I think the community can implement custom completer in separate R packages pretty easily.

We're working on making completion more extensible; see:

but right now this is limited to R code. Providing an interface which can support completion of arbitrary languages is a very difficult engineering task. We're keeping an eye on this project:

http://langserver.org/

3 Likes

Thanks Jonathan! I agree supporting arbitrary language completion is hard and I imagine this feature wouldn't be ready for another few months or even a year. Last time I saw SQL completion was discussed is from July 0216 when SQL chunk was first supported.

The langserver you pointed looks very promising but I don't expect you get it into RStudio anytime soon. My question is just whether you can provide a plug in point in RStudio for arbitrary completion in RMarkdown.

The recent addition of emoji completion is a good example. I understand while it is possible to implement R side completion in R package today, but we still need to write custom logic to auto-complete everywhere else in RStudio. If we can generalize that a little then the completion logic can live in the R package itself and any improvements do not need to be tied with RStudio releases.