summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAlan Pearce2025-01-24 15:00:59 +0100
committerAlan Pearce2025-01-24 15:00:59 +0100
commita1b286b387fe9dcb9a0dd27d62c7709d005bcead (patch)
treed2c00bc85aeba476e2fc702d0f40ddb383c210bd
parent5ea877fe690a870383f83ef5f8138e5abbe07fc0 (diff)
downloadnixfiles-a1b286b387fe9dcb9a0dd27d62c7709d005bcead.tar.lz
nixfiles-a1b286b387fe9dcb9a0dd27d62c7709d005bcead.tar.zst
nixfiles-a1b286b387fe9dcb9a0dd27d62c7709d005bcead.zip
emacs: disable line numbers in eshell
-rw-r--r--user/emacs/init.el10
1 files changed, 10 insertions, 0 deletions
diff --git a/user/emacs/init.el b/user/emacs/init.el
index 97c5e669..fe6e202a 100644
--- a/user/emacs/init.el
+++ b/user/emacs/init.el
@@ -139,6 +139,15 @@
 (setq-default display-line-numbers 'relative
               display-line-numbers-widen t
               display-line-numbers-width 4)
+
+(defun turn-off-display-line-numbers-mode ()
+  (interactive)
+  (display-line-numbers-mode -1))
+
+(defun turn-on-display-line-numbers-mode ()
+  (interactive)
+  (display-line-numbers-mode (default-value 'display-line-numbers)))
+
 (setq frame-resize-pixelwise t
       window-resize-pixelwise t
       display-buffer-alist `(("\\*\\(?:shell\\|compilation\\)\\*" display-buffer-in-side-window
@@ -736,6 +745,7 @@ _C-k_: prev  _u_pper              _=_: upper/lower       _s_mart resolve
   :defer 5
   :commands (eshell)
   :functions (eshell/pwd)
+  :gfhook #'turn-off-display-line-numbers-mode
   :general (:keymaps 'eshell-command-map
                      "C-r" #'eshell-history-backwards
                      "C-s" #'eshell-history-forwards)