term/eshell: remove esh-autosuggest, improve company integration

esh-autosuggest only provides history completion, which isn't very
useful, especially when we already have history search (via ivy/helm)
available on 'C-s' in eshell.

The active company-backends have been rearranged so that company-capf is
the main completer, but will fall back to company-files (since capf
doesn't complete files, only directories and commands).

I wish there were something more robust, however. Perhaps a way to
integrate pcomplete into company?
This commit is contained in:
Henrik Lissner 2019-10-21 09:42:14 -04:00
parent af7f75089f
commit 25f6d5fec0
No known key found for this signature in database
GPG Key ID: 5F6C0EA160557395
2 changed files with 3 additions and 9 deletions

View File

@ -45,7 +45,7 @@ You should use `set-eshell-alias!' to change this.")
(defvar +eshell--default-aliases nil)
(defvar +eshell--company-backends '(company-files company-capf))
(defvar +eshell--company-backends '((company-capf :separate company-files)))
;;
@ -152,7 +152,8 @@ You should use `set-eshell-alias!' to change this.")
[remap doom/backward-to-bol-or-indent] #'eshell-bol
[remap doom/backward-kill-to-bol-and-indent] #'eshell-kill-input
[remap evil-window-split] #'+eshell/split-below
[remap evil-window-vsplit] #'+eshell/split-right))
[remap evil-window-vsplit] #'+eshell/split-right)))
(add-hook! 'eshell-mode-hook
(defun +eshell-init-company-h ()
(when (and (featurep! :completion company)
+eshell--company-backends)
@ -182,9 +183,3 @@ You should use `set-eshell-alias!' to change this.")
(use-package! esh-help
:after eshell
:config (setup-esh-help-eldoc))
(use-package! esh-autosuggest
:after eshell
:init (add-to-list '+eshell--company-backends 'esh-autosuggest)
:config (setq esh-autosuggest-use-company-map t))

View File

@ -5,4 +5,3 @@
(package! eshell-z)
(package! shrink-path)
(package! esh-help)
(package! esh-autosuggest)