-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Company backends should be grouped #2323
Comments
Is there way to override this variable in configuration? (excuse me, total emacs newbie, coming from VIM :D) |
@cpaulik Am I wrong? |
Ok, with trial and error method I've added to dotspacemacs/config this
And it's working. @zilongshanren, AFAIK, you are wrong (pythonic-emacs/company-anaconda#8). |
@zilongshanren That is what I thought too, but according to one of the company-mode developers in the discussion at pythonic-emacs/company-anaconda#8 this is not the case |
@zilongshanren actually you are partly correct. If point is in a region where a backend can not complete then it will move to the next backend. If however a backend could complete in theory but can not come up with any completion candidates then it will not choose the next backend. |
@cpaulik @nookiepl |
@cpaulik I have modified my company backends to
It's a big win, thanks. |
After trying this for a while I actually think that there might be too many candidates mixed. It seems that the completion candidates are not ordered by backend which I see as a problem. |
We could fix this by changing the @syl20bnr Do you think it makes sense to add a option for it or should this become the default if we decide to group backends? |
@syl20bnr Have you had a chance to look at this? I've been using grouped backends sorted by backend importance for a while now and it works well. At least in python. |
I totally missed this issue, sorry about that. None of the options listed above are OK to me but we can damage control by trying your last proposition to sort by backends. What I don't like at all is that it implies a lot of computing for nothing and it does not scale very well. |
With the sorting by backend importance, what about backends declared with |
I see your point about the computation. The thing is that at least for python the other backends are hardly ever used since At the moment I use (setq company-backends-python-mode '((company-anaconda :with company-dabbrev :with company-yasnippet)))
(setq company-transformers '(spacemacs//company-transformer-cancel
company-sort-by-backend-importance)) If now get completion for variable names and module names that anaconda can not resolve but that I have used before. This is IMHO way superior to the current system. I think that the main completion mode and As far as I can tell the backends are sorted properly only if |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please let us know if this issue is still valid! |
I think company backends should be grouped and not pushed to the beginning of the list.
e.g. in python
company-anaconda
is pushed to the beginning of thecompany-backends
which means all the other backends are never used even ifcompany-anaconda
can not find a completion candidate. It would however be great ifcompany-dabbrev-code
could be used in tandem withcompany-anaconda
Per default the value of
company-backends-python-mode
isI think it should be
Unless I misunderstood how company works and this should be handled by
company-anaconda
The text was updated successfully, but these errors were encountered: