emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: enabling company-capf support in cfengine.el


From: Ted Zlatanov
Subject: Re: enabling company-capf support in cfengine.el
Date: Sun, 22 Dec 2013 20:11:46 -0500
User-agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.3.50 (gnu/linux)

On Mon, 23 Dec 2013 02:17:35 +0200 Dmitry Gutov <address@hidden> wrote: 

DG> Ted Zlatanov <address@hidden> writes:
>> Anyhow, right now I do this in `cfengine3-mode':
>> 
>> #+begin_src lisp
>> (add-hook 'completion-at-point-functions
>> #'cfengine3-completion-function nil t)
>> #+end_src
>> 
>> Is that enough?  I can recommend to users that they should enable the
>> `company-capf' backend in the cfengine.el docs, if so.

DG> Should be. As long as you can't (or don't indend to) support the more
DG> advanced features, such as showing candidate signature (when it's a
DG> function), its definition and documentation. No idea if any of that is
DG> even applicable to CFEngine.

It is.  I provide ElDoc support currently.  Is there a way to avoid
custom work for company-mode, and instead provide a commonly
understandable list of function definitions that works for ElDoc and for
company-mode?  ElDoc is pretty simple, it expects me to do all the work
to find the current function and write the mini-docstring for it.

CFEngine's syntax is actually very rigid and predictable.  There are
only specific things that can go at every point in the syntax, so it
could use completion not just for function calls.  It's a bit like XML
with an enforced schema, and autocompletion could work really well
there.  I haven't had the time to explore that direction, there's too
much on my TODO list :) but it seems like Semantic integration would
actually make sense instead of custom code for this.  Advice welcome.

DG> But you also might want to wait until the next Company version is
DG> released, and then only ask users to install it, without having to
DG> change the list of backends.

OK, sounds good.  Thanks.

Ted




reply via email to

[Prev in Thread] Current Thread [Next in Thread]