Closed iago-pssjd closed 9 months ago
The omni completion is not prepared to complete the names of columns within square brackets. If this feature were implemented, it should be for data.frame
s first because data.frame()
is a function from the base
library. However, I'm sorry, but I may not prioritize this soon because people not used to R notation have less difficulty understanding the use of filter()
and select()
from the dplyr
library, which I'm using when writing new code. Of course, it would be great if someone could write a pull request for this.
Thanks for the answer.
Just a question more. I do not know vim insights to make a PR and do not understand the plugin code, but may I ask if the issue does occur through these lines and why within square brackets, even when explicited as part of a function name like in '[.data.table'(DT,, .(
?
https://github.com/jalvesaq/Nvim-R/blob/807871d93a03ef1029971ba558272a6a9e2326eb/R/complete.vim#L417-L436
Closing because Nvim-R will not get new features.
Hi!
I am testing omni completion, so I added next lines to my
~/.vimrc
file:Mainly, the goal is in last line. If
DT
is adata.table
, then the next is possible:so, I would want that when I have typed
DT[, .
orDT[, list(
, omni-completion (through Ctrl-X Ctrl-O) would expand the list of variables (in this casex
,y
). SinceDT[, .(x)]
is equivalent to`[.data.table`(DT,, .(x))
, or even to'[.data.table'(DT,, .(x))
, I tried including this function inR_fun_data_2
as explicited above. However, it does not work; omni-completion expands the default menu instead of data.table variable names.This happens both if I type
DT[,.
, but also if I type`[.data.table`(DT,, .(
or'[.data.table'(DT,, .(
. I understand that working the first would be a FR for NVim-R (may I ask for it?). But the second and third should work already. Isn't it?Thank you!