[ESS] company-mode
Vitalie Spinu
@p|nuv|t @end|ng |rom gm@||@com
Wed Oct 21 16:39:58 CEST 2015
You need to look into grouped company grouped backends.
Something along the following:
(setq-local company-backends
(append '((company-dabbrev-code company-R-args company-R-objects))
company-backends))
Don't forget to
(setq ess-use-company nil)
to avoid the "user-friendliness" of ESS.
BTW, my personal preference is to use M-/ as a complementary tool to auto
completion. I think squeezing all the tools into one key is rather inefficient.
Viitalie
>> On Wed, Oct 21 2015 13:16, Henric Winell wrote:
> Den 2015-10-20 kl. 19:02, skrev Vitalie Spinu:
>> R company backends ask the process for completions. If you haven't
>> evaluated summm you won't have it.
> I see. I switched from auto-complete, which works out of the box here
> (and so does RStudio), so I was a bit surprised.
>> You can always add company-dabbrev in front of local company-backends
>> list to fix this.
> Thanks! I tried the following
> (defun company-ess-setup ()
> (setq-local company-backends
> (append '(company-dabbrev) company-backends)))
> (add-hook 'ess-mode-hook 'company-ess-setup)
> Is this what you had in mind? I mean, it sort of works, but the popup is lost
> and summm isn't among the suggestions, so I probably did this the wrong way.
> Henric
>>
>> Vitalie
>>
>>>> On Tue, Oct 20 2015 16:12, Henric Winell wrote:
>>
>>> Hi,
>>
>>> I'm trying out the new ESS completion mechanism using company-mode.
>>> Many thanks for adding this! But I'm missing one feature: if I
>>> type in, e.g.,
>>
>>> summm <- 5 sum
>>
>>> and then press [TAB] in a buffer where R-mode is enabled, 'summm'
>>> isn't listed among the suggestions. It can, however, be done by
>>> calling company-dabbrev by pressing M-/, but that's one key-press
>>> to many... ;)
>>
>>> How can I add the suggestions from company-dabbrev to the
>>> suggestions from the ESS backend?
>>
>>> Henric Winell
>>
>>> ______________________________________________
>>> ESS-help using r-project.org mailing list
>>> https://stat.ethz.ch/mailman/listinfo/ess-help>
More information about the ESS-help
mailing list