I've tried corfu with eglot, works pretty well (amazing work, as always).
I decided to give it a try with ESS, which relies on CAPF + some Company-specific backends (so I also took that as an opportunity to try cape; also a really cool package).
In R, dataframes are named lists, and their elements (i.e. features/columns/variables) can be accessed using the $ operator.
In the example below, I consider iris, a builtin dataset, but the result is the same if I assign it to foo or bar.
With Company, I can type (in one shot) iris$, and the popup will suggests the different elements it contains:
However, I failed to have Corfu behaving the same way. If I type iris$ in one shot, Corfu will only suggest the corresponding object candidate, that is, iris. I then have to select it, and then use the $ operator to have Corfu suggesting the different elements of the list:
I tried to play with corfu-preselect, but didn't succeed to get the desired behavior. Same when I tried to change the order the different backends were added to completion-at-point-functions via cape-company-to-capf.
Is there a way to make corfu behave the way company does? Could my problem be due to the fact that corfu treats as $ as the regex metacharacter?
Hi @minad,
I've tried
corfu
witheglot
, works pretty well (amazing work, as always). I decided to give it a try withESS
, which relies on CAPF + some Company-specific backends (so I also took that as an opportunity to trycape
; also a really cool package).In R, dataframes are named lists, and their elements (i.e. features/columns/variables) can be accessed using the
$
operator. In the example below, I consideriris
, a builtin dataset, but the result is the same if I assign it tofoo
orbar
.With Company, I can type (in one shot)
iris$
, and the popup will suggests the different elements it contains:However, I failed to have Corfu behaving the same way. If I type
iris$
in one shot, Corfu will only suggest the corresponding object candidate, that is,iris
. I then have to select it, and then use the$
operator to have Corfu suggesting the different elements of the list:I tried to play with
corfu-preselect
, but didn't succeed to get the desired behavior. Same when I tried to change the order the different backends were added tocompletion-at-point-functions
viacape-company-to-capf
.Is there a way to make
corfu
behave the waycompany
does? Could my problem be due to the fact thatcorfu
treats as$
as the regex metacharacter?Thanks a lot for the great work!
Best, M
Emacs 29.3 Corfu 20240409.438 (Melpa) Cape 20240411.2207 (Melpa)