-
Notifications
You must be signed in to change notification settings - Fork 265
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
Conflict between company-tng and company-preview-frontend #41
Comments
I use my own modified version so I can use company-preview-frontend. |
Just to clarify: It's not something we can expect upstream to fix. |
What's your proposed fix? Mine is
|
Why would not upstream bind to |
It might be better to take a close look at that thread. For reference, I do use those keys too.
|
I did read the thread (and just re-read it) but I'm not sure I get your point. Is it because that would break yasnippet? I don't use snippets and I don't use company much to be honest, so I'm a little ignorant in that area. On a different topic, why do you double-assign your bindings with vector syntax and kbd syntax (e.g. |
If the fix cannot go upstream, I don't think it should go here either, so I suggest we just add to evil-company an explanatory comment with workaround. |
Pasting a comment from that thread. Problem #1
Problem #2
No good reason. |
OK, I think I get it, and company-mode/company-mode#706 (comment) suggests we do our own bindings.
would work everywhere I believe, and the thread did not mention it. You sure upstream would not consider it? |
Could you clarify what you expect to happen (and what does happen) when you use eshell+company+tng Referencing this:
Just want to make sure we're on the same page. |
Yeah, I was starting to think we are talking about two different problems. But I think they overlap.
With evil-company, that does not work because |
Here's repro. Keymap for session.
Repro # 1
;; Repro # 2
Can you tell me if this matches your expectation? If it does, I don't think it's the TAB selection that is the problem (though it can be a factor in the solution/workaround). It would be good to get exact values from company/etc to drive this forward. |
My case would correspond to repro # 2 except that I don't get any "popup". Also I don't have the "double preview problem". |
Sorry, the 'popup' in this case refers to the preview.
If you don't get a popup/preview, again, that doesn't seem like a 'TAB' problem. The double preview only happens after you've completed/selected a selection but that can only happen if you saw the preview in the first place. |
I see the preview, but I can't complete so the double preview issue cannot happen. |
Can you post your related company-* values? company-frontends, company-backends, company-diag, etc? |
|
Don't you want
company-tng-frontend also? Also check your
|
So if I add company-tng-frontend, it solves my issue but triggers the double-preview issue. If we enable company-tng in Evil-collection, it means that the user must enable the tng frontend? Should we automate this? Else we should document it. |
You can give that a shot and reverse engineer the solution. It's in the advice to company-preview-frontend. |
Also, company-tng function already configures the frontend. I think you're resetting it somehow. Here's the function definition.
|
@Ambrevar FWIW, I made some updates to https://github.com/dieggsy/company-eshell-autosuggest - it now comes with a minor-mode that locally overrides company (the map, frontends, backends, delay) for internal use, so this shouldn't be too much of a problem. the minor mode is still a bit of a work in progress (I should probably expose the local |
Alright, this seems to be fixed then! Thanks! |
My bad, it does not seem to be fixed :( |
@Ambrevar if it doesn't seem to be fixed, it could be on company-eshell-autosuggest's end - company-active-map is local to eshell's buffer now. In theory that means |
Note that it's exposed through |
I don't have any problems with eshell-autosuggest using my settings by the way. Again, I think @Ambrevar is hitting the double preview problem which means either monkey patching those functions (like I did) or not using the preview frontend with tng. |
What do you mean by this? Are you saying eshell-autosuggest works for you, or that you'd rather it pick up your company-defaults? (There's an option for it to not override company-active-map, though I don't like or recommend it since IMO, tab should trigger shell completion (regardless of suggestion) and ret should trigger sending your input to th eshell (regardless of suggestion))
I'm just a bit confused as to how this is happening, since the new minor mode locally overrides front-end, back-end and active-map in an eshell hook, so as to just act like fish autosuggestions without external interference from company. |
I just meant I didn't have any problems with eshell-autosuggest before your changes. I haven't tried the new changes yet so can't comment on anything related to that. |
Ah, got it. My biggest issue was the stated tab/ret behavior where |
Same issue as before: I see the preview but pressing does nothing. |
@Ambrevar to clarify, are you using the minor mode, or not? |
Sorry, I had misunderstood your previous comment about the minor mode. It works! I think it's a decent solution to the problem. (Maybe there is something better to be fixed upstream but I don't know company well enough.) Typo in the docstring of the minor mode: |
@Ambrevar i'll update that, it should say "...customizable by adding keys to |
I think it's safe to close this now. Thanks for the support! |
I use company-eshell-autosuggest which uses company-preview-frontend in Eshell to display commandline suggestions "à-la fish-shell".
TAB is normally used to confirm the suggestion. It is bound to
company-complete-common
.With
evil-collection
, we enable company-tng throughcompany-tng-configure-default
which rebinds TAB and thus makes it impossible to confirm suggestions in Eshell.This could be considered an upstream issue but maybe some of you know better. Any opinion on this?
The text was updated successfully, but these errors were encountered: