From 25f6d5fec0dabc6406b0fec9e29c6c7ed19f0834 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 21 Oct 2019 09:42:14 -0400 Subject: [PATCH] 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? --- modules/term/eshell/config.el | 11 +++-------- modules/term/eshell/packages.el | 1 - 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/modules/term/eshell/config.el b/modules/term/eshell/config.el index 0c97a9113..7b792b158 100644 --- a/modules/term/eshell/config.el +++ b/modules/term/eshell/config.el @@ -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)) diff --git a/modules/term/eshell/packages.el b/modules/term/eshell/packages.el index 9599d58d8..31920f973 100644 --- a/modules/term/eshell/packages.el +++ b/modules/term/eshell/packages.el @@ -5,4 +5,3 @@ (package! eshell-z) (package! shrink-path) (package! esh-help) -(package! esh-autosuggest)