feat(eshell): add imenu support

This commit is contained in:
StrawberryTea 2023-10-27 23:23:39 -05:00 committed by Henrik Lissner
parent e4b1ed5a6a
commit dc16fe10e3

View file

@ -105,6 +105,12 @@ You should use `set-eshell-alias!' to change this.")
;; cursor comes close to the left/right edges of the window. ;; cursor comes close to the left/right edges of the window.
(setq-hook! 'eshell-mode-hook hscroll-margin 0) (setq-hook! 'eshell-mode-hook hscroll-margin 0)
;; Recognize prompts as Imenu entries.
(setq-hook! 'eshell-mode-hook
imenu-generic-expression
`((,(propertize "λ" 'face 'eshell-prompt)
,(concat eshell-prompt-regexp "\\(.*\\)") 1)))
;; Don't auto-write our aliases! Let us manage our own `eshell-aliases-file' ;; Don't auto-write our aliases! Let us manage our own `eshell-aliases-file'
;; or configure `+eshell-aliases' via elisp. ;; or configure `+eshell-aliases' via elisp.
(advice-add #'eshell-write-aliases-list :override #'ignore) (advice-add #'eshell-write-aliases-list :override #'ignore)