Open codygman opened 3 years ago
I guess something in the evil-collection eshell module probably conflicts with esh-autosuggest.
Actually I think loading esh-autosuggest before evil-collection fixes it like:
(use-package evil-collection
:after '(evil esh-autosuggest)
:config
(evil-collection-init))
Sadly the above solution messes up other parts of evil-collection such as evilifying magit bindings.
Can you provide a more minimal breaking example? I use evil-collection and esh-autosuggest together with no problem.
@dieggsy This illustrates the problem for me:
(eval-and-compile
(require 'package)
(package-initialize)
(require 'use-package)
)
(use-package evil
:ensure t
:init
(setq evil-want-keybinding nil)
:config
(evil-mode 1)
)
(use-package evil-collection
:ensure t
:after evil
:config
(evil-collection-init)
)
(use-package esh-autosuggest
:ensure t
:hook (eshell-mode . esh-autosuggest-mode))
Above will not suggest anything. If you remove the evil-collection-init
it works. If you run evil-collection-init
after starting an eshell it continues working but the suggestions/completions change position. Just as in the original bug report.
I don't have time to try it right now, but I bet if you replace (evil-collection-init)
with (evil-collection-eshell-setup)
the bug will still happen meaning we can focus on what it does.
@codygman @dieggsy I think I've found the source of the issue. And it's not the eshell-setup part of evil-collection. This "solves" the problem for me:
(use-package evil-collection
:ensure t
:after evil
:config
(setq evil-collection-company-use-tng nil)
(evil-collection-init)
)
So I guess the problem comes from:
https://github.com/company-mode/company-mode/blob/master/company-tng.el
and/or
@johnae sorry for the delay (I know it can be frustrating to not hear back from project maintainers) and thanks for narrowing this down for me and for the references! This month is crazy busy but I will take a look at the info and see if I can look into a solution. Indeed, I had evil-collection-company-use-tng
already set to nil
in my config, which would explain why I wasn't seeing this issue.
Maybe I'll make a note of this in the README for the time being...
@dieggsy I think it would be nice to explicitly mention company-tng-mode
instead of evil-collection
in the README. Since I don't use evil, I skipped that section and then had to bisect my company config to figure out why the autosuggestions were not working for me.
If you're too busy at the moment, I can try to come up with a nice wording and open a PR
With this config esh-autosuggest will not work:
However... if you comment out the
evil-collection-init
part out and call that after loading an eshell withesh-autosuggest
you'll notice it changes the style of completion. Not sure why that is.