Closed alexander-yakushev closed 1 month ago
Seems we constantly manage to both fix something and break something on the completion side of things. Let me think about this for a bit.
Sure. But what I understood from @dgutov words is that a custom completion style is an OK solution for many packages, not something to shun from.
I'm mostly worried about this part:
Please go ahead and ping me if you have further questions or problems adapting the style implementation. This is still a breaking change in company-mode's behavior, and I'd like to see all major completion providers onboard before tagging the next release.
I'm not sure if this will work fine with the current stable version of company, so I wanted to investigate. But if you're sure about this I guess we can proceed.
It should be fine. The changes in Company introduced problems for the current flex
-based solution but didn't touch the old custom completion-style solution. Besides, it's opt-in anyway, so it wouldn't impact users that don't have it enabled in the first place.
@bbatsov
I'm not sure if this will work fine with the current stable version of company, so I wanted to investigate.
The new release came out a month ago, so this won't be a problem. I indeed hoped to get more backends onboard first, but that only had partial success. OT2H, the problem had been present with all (?) other UIs except company-mode, so it can't be too bad.
@alexander-yakushev
a custom completion style is an OK solution for many packages, not something to shun from
I agree this is more complicated than we'd want to, but for now it's what's recommended for CAPF. Also see eglot's and lsp-mode's styles.
Back to completion woes.
Some time ago we moved the official way to enable fuzzy Compliment-driven completion from a custom completion style to
flex
. This worked correctly until https://github.com/company-mode/company-mode/issues/1493 – cider completion now no longer suggests candidates for class shortnames like e.g.Persistent
. Nothing has been broken in Company, vice versa, Company has became more like corfu andcomplete-at-point
, so it was already broken in those clients.I tried to fix it for
flex
but did not succeed. It looks like owning a custom completion style is still the proper way to go, so I'm resurrecting it with this PR and undeprecating the previous way to enable "fuzzy" completion. The current partial compatibility withflex
remains, so if folks prefer to use that, they still can.I've also fixed our custom completion style so that it is compatible with Emacs machinery – something that users complained about before.