Closed liamvdvyver closed 1 year ago
Thanks for reporting the issues. I will soon try to fix the df1
. The case of df2
can't be fixed with the current implementation because cmp-nvim-r
would have to know that select()
returns a data.frame.
Adding the line below to your init.vim
should fix the issue with df3
:
let R_fun_data_1 = ['select', 'rename', 'mutate', 'filter', 'group_by']
If using init.lua
:
vim.g.R_fun_data_1 = {'select', 'rename', 'mutate', 'filter', 'group_by'}
As for df2
, in my experience normally longer pipelines are just manipulating data frames till the final step, so it would be useful to have completions coming from the first item in the multi line pipeline. I plan on implementing this for myself, if you share my view I'll send a PR when I finish. It may be best to add a setting and make it non default to prevent innaccurate suggestions.
Yes, I agree. Please, do it.
Hello,
Completions for column names of a data frame piped into a function seem to work incosistently. Below are a few examples:
When assigning
df1
, no column names are suggested. When assigningdf2
, colums are suggested inselect()
, but not infilter()
, althoughfilter()
works fine when it is the first function after the pipe on a new line. When assigningdf3
, no columns are suggested in thegroup_by()
.Thanks!