Closed conig closed 1 month ago
Thanks for reporting! I could never find a way to get the list of objects from the current browsing environment in C. This limitation affects both the Object Browser and auto-completion. I will add this issue to the known bugs section.
The problem is in this line of nvimcom/src/nvimcom.c
:
PROTECT(envVarsSEXP = R_lsInternal(R_GlobalEnv, allnames));
Instead of R_GlobalEnv
we should list the objects of the active environment, but I don't know how to find the active environment. If anyone reading this comment knows how to fix the issue, please, make a pull request...
Thanks for your time on R.nvim and cmp-r. I'm really enjoing both.
I have found that completions do not work for objects within browser().
Example code:
Video demonstration:
https://github.com/user-attachments/assets/5c4161aa-d93a-4b6f-abbd-4112239b2edf
I'm using the example setup.