Closed statquant closed 1 year ago
Completion with cmp-nvim-r
is not triggered by <Space>
, but I created a branch for this:
https://github.com/jalvesaq/cmp-nvim-r/tree/space
Can you try it, please? If it does not have any undesired side effects, I will add <Space>
to the list of triggering characters in the main branch.
Hello @jalvesaq, sorry for the delay in the answer. I tested your branch and it works perfectly. Thank you very much for this.
I have a follow up question, when selecting from argument selection say
data.table::fread(file = "toto", <here>)
any selection will insert choice =<cursor here>
is there a way to parametrize this so I get choice = <cursor here>
(an additional space between = and
The space is already added:
But it seems that cmp-nvim
removes it:
Hello, I am migrating from vim to neovim and I am trying to setup the auto-completion. I cannot find out how to setup completion while completing
R
function arguments.For instance if I do
data.table::fread(<tab>
everything works perfectly and I'll see all the options. I chose<tab>
for completion so I can complete sayinput
but for the next argument it only completes after commadata.table::fread(input = my_file,<tab>
this will work perfectly. But if I dodata.table::fread(input = my_file, <tab>
(note the space before the tab) this won't work (unless I ask for completion explicitly with<ctrl><space>
(that I have set).This still annoys me because I abide by the usual RStudio coding style which requires
function(arg = val1, arg2 = val2)
which requires<space>
after commas.I realize that this is merely a nvim-comp setting and not really a cmp-nvim-r but because you usually give useful tips in the docs and this is likely to be useful to many people I dare to ask.