summary refs log tree commit diff stats
path: root/user
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
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')
-rw-r--r--user/emacs/init.el8
-rw-r--r--user/settings/emacs.nix2
2 files changed, 7 insertions, 3 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 ()
diff --git a/user/settings/emacs.nix b/user/settings/emacs.nix
index 73673e53..a4ab16ed 100644
--- a/user/settings/emacs.nix
+++ b/user/settings/emacs.nix
@@ -81,6 +81,7 @@ in
         auto-async-byte-compile
         avy
         bash-completion
+        capf-autosuggest
         company
         company-tabnine
         consult
@@ -92,7 +93,6 @@ in
         editorconfig
         eglot
         eldoc-box
-        esh-autosuggest
         esh-buf-stack
         esh-help
         eshell-fringe-status