R-nvim / R.nvim

Neovim plugin to edit R files
GNU General Public License v3.0
155 stars 16 forks source link

Support namespace prefix in `nvim.print()` #105

Closed hongyuanjia closed 6 months ago

hongyuanjia commented 6 months ago

Pull request overview

Currently, nvimcom::nvim.print() does not support functions with namespace, e.g.:

dplyr::filter(mtcars, mpg > 20)
           ^--- cursor here

> nvim.print("dplyr::filter", "mtcars")
Error in get(object) : object 'dplyr::filter' not found
In addition: Warning message:
In nvim.print("dplyr::filter", "mtcars") : object 'dplyr::filter' not found

This PR fixes this, besides other enhancements, including:

jalvesaq commented 6 months ago

Thank you! Looks good for me! I tried it and it works.