bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#51819: The Senselessness of Emacs Company Mode


From: Carlos Pita
Subject: bug#51819: The Senselessness of Emacs Company Mode
Date: Mon, 15 Nov 2021 03:51:14 -0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (darwin)

Lars Ingebrigtsen <larsi@gnus.org> writes:

> irenezerafa <irenezerafa@protonmail.com> writes:
>
>> I am installing Company Mode so I can use auto completion.  Let me
>> show you how beautiful that is using the emacs way.  For most people,
>> they do "M-x list-packages" and search for "company".  They get about
>> 70 matches for "company-mode" which add compatibility for other modes.
>
> I think most people are able to figure out that they should add the
> package called "company" if they want to install Company.  (It's
> conveniently listed first among the packages that are Company-related.)

Moreover, there is little gain in using company-specific extensions
these days.  Most completing-read frameworks offer completion-at-point
compatibility, which inherits all the goodies from completing-read. And
if you prefer an in-place popup install corfu which shows a child frame
with zero extra config. Even company is moving more and more towards its
capf backend. Maybe some extensions still require or greatly benefit
from some company-specific protocol, but this is not the norm nowadays.

I'm using a combo of fido-mode + corfu which, if I wanted, could be
extended with consult, embark, marginalia, orderless, etc. I prefer to
keep it small, but the beauty of the new "completion stack" is that the
building blocks follow standard emacs protocols and are intercompatible
(so it's completely fine to use any of them with icomplete/fido). This
is all the configuration I need to get a "modern" completion experience:

    (setq completion-styles '(flex basic))
    (icomplete-vertical-mode +1)
    (fido-mode +1)
    (corfu-global-mode +1)

The only external dependency is the minimal, high-quality corfu
extension.

I understand the OP's frustration though, because this simplicity is not
a given but the result of an exhausting process of research and
refinement, there are a lot of options and (ill-)advice usually comes in
the form of installing yet another extension. One has to learn many
things that would be better not to know.

One complaint I have is that icomplete doesn't offer a builtin
completion-at-point mode. Strictly, it offers one but it's rather broken
(see my report #51575). I believe it would be easy to channel
completion-at-point to the minibuffer as other extensions more or less
trivially do, although this is not compatible with LSP servers. OTOH an
at-point popup is likely harder to implement and both overlays and child
frames have their own drawbacks (again, see #51575). In any case, a
builtin solution is not scifi at this point and, since the community is
already converging around core protocols, I see this as an opportunity
to greatly simplify the completion story.

Best regards,
Carlos






reply via email to

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