REditorSupport / languageserver

An implementation of the Language Server Protocol for R
Other
589 stars 93 forks source link

Make R code auto-completion work within in-line R chunk #442

Open jooyoungseo opened 3 years ago

jooyoungseo commented 3 years ago

While code completion does work in block chunk, it does not work inside in-line R chunk.

Examples are as follows:

``` r
# Hit ctrl+spacebar to invoke auto-suggestion after typing the following line:
ggp

The following does not work:

r ggp

renkun-ken commented 3 years ago

I think it is possible to support this. Just check if the document is Rmd and then if the cursor is not in a code chunk but inside a backtick quote that starts with `r then completion should be provided.