Closed PMassicotte closed 9 months ago
Currently, it's not possible to autocomplete the names of objects from non-loaded libraries because nvimrserver
only loads from Nvim-R's cache directory data from loaded libraries. Moreover, Nvim-R only builds the cache files when a library is loaded.
Ok thank you!
Just noticed that it works if R is closed and if I am using this:
vim.g.R_start_libs = 'base,stats,graphics,grDevices,utils,methods,janitor'
However, it stops working when R starts
Yes, this is documented in section 6.3.
of doc/Nvim-R.txt
(Omnicompletion and syntax highlighting). It will even work for libraries that were never loaded because their data will be cached at Nvim-R initialization.
The implementation of what you requested when opened the issue is:
nvimrserver
a list of unloaded libraries.package::
is required, load the library data on the list of unloaded libraries and do the completion from this data.Notes:
nvimrserver
from loading incomplete data.This is an issue for our new R.vim when it's inaugurated...
I often use helper functions, like
janitor::clean_names()
, when processing data. I have looked in the documentation and I could not find if it was possible to trigger autocomplete from non-loaded library using::
.Thank you