jayli / vim-easycomplete

杭州市余杭区最好用的 VIM/NVIM 代码补全插件
MIT License
419 stars 26 forks source link

Adding R Markdown for R completion #174

Closed fasterius closed 2 years ago

fasterius commented 2 years ago

I'm currently trying out your plugin, and it looks very nice so far - thanks a lot for you effort! I code a lot in R, but do so inside R Markdown (filetype = rmarkdown, extensions .Rmd and .rmd). Getting the r-languageserver to work in normal R scripts works just fine, but I also want it to work inside R Markdown files.

I assume I have to change the allowlist or something similar, but I cannot find out how to do it in the documentation. Any help?

jayli commented 2 years ago

I've fixed it. Please update vim-easycomplete. rmd and rmarkdown filetypes are supported by default.

After updating. You can add missing filetypes via g:easycomplete_filetypes:

let g:easycomplete_filetypes = {
      \   "sh": {
      \     "whitelist": ["shell"]
      \   },
      \   "r": {
      \     "whitelist": ["rmd", "rmarkdown"]
      \   },
      \ }
fasterius commented 2 years ago

Thanks, that works perfectly!