term/eshell: remove company integration

pcomplete simply provides better completion (but with a terrible UI).
There must be a way to integrate it into company...
This commit is contained in:
Henrik Lissner 2019-10-21 09:57:48 -04:00
parent 25f6d5fec0
commit a7a3e0e0e9
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -45,7 +45,6 @@ You should use `set-eshell-alias!' to change this.")
(defvar +eshell--default-aliases nil) (defvar +eshell--default-aliases nil)
(defvar +eshell--company-backends '((company-capf :separate company-files)))
;; ;;
@ -152,19 +151,7 @@ You should use `set-eshell-alias!' to change this.")
[remap doom/backward-to-bol-or-indent] #'eshell-bol [remap doom/backward-to-bol-or-indent] #'eshell-bol
[remap doom/backward-kill-to-bol-and-indent] #'eshell-kill-input [remap doom/backward-kill-to-bol-and-indent] #'eshell-kill-input
[remap evil-window-split] #'+eshell/split-below [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)
(company-mode +1)
(setq-local company-backends +eshell--company-backends)
(setq-local company-frontends (cons 'company-tng-frontend company-frontends))
(let ((map eshell-mode-map))
(define-key map (kbd "TAB") #'+company/complete)
(define-key map [tab] #'+company/complete))
(when (bound-and-true-p evil-local-mode)
(evil-normalize-keymaps))))))
(use-package! eshell-up (use-package! eshell-up