summary refs log tree commit diff stats
path: root/user/emacs
diff options
context:
space:
mode:
authorAlan Pearce2023-03-19 10:19:50 +0100
committerAlan Pearce2023-03-20 16:03:46 +0100
commit21729d21ff2678b83984ee1a4e600c6e88cef2ce (patch)
tree6ef7d6a8b6b66cb17e4bc4d97f351aba611be816 /user/emacs
parent23b4dcb32b7f7fbf1c12d23030b9de02d64c955f (diff)
downloadnixfiles-21729d21ff2678b83984ee1a4e600c6e88cef2ce.tar.lz
nixfiles-21729d21ff2678b83984ee1a4e600c6e88cef2ce.tar.zst
nixfiles-21729d21ff2678b83984ee1a4e600c6e88cef2ce.zip
emacs: improve shell autosuggestions and enable in comint modes
replace esh-autosuggest with capf-autosuggest
Diffstat (limited to 'user/emacs')
-rw-r--r--user/emacs/init.el8
1 files changed, 6 insertions, 2 deletions
diff --git a/user/emacs/init.el b/user/emacs/init.el
index ff9c6902..a6677698 100644
--- a/user/emacs/init.el
+++ b/user/emacs/init.el
@@ -712,9 +712,13 @@ _p_rev       _u_pper              _=_: upper/lower       _r_esolve
   :general ("C-`" #'eshell-toggle)
   :config (setq eshell-toggle-use-projectile-root t))
 
-(use-package esh-autosuggest
+(use-package capf-autosuggest
   :after eshell
-  :ghook ('eshell-mode-hook))
+  :general (:keymaps 'capf-autosuggest-active-mode-map
+                     "C-e" #'capf-autosuggest-end-of-line
+                     "<right>" #'capf-autosuggest-end-of-line)
+  :ghook ('(eshell-mode-hook
+            comint-mode-hook)))
 
 (declare-function eshell-push-command "esh-buf-stack" (CMD))
 (defun my-bind-esh-push ()