From ca572a288bd18590797cfa029a61c24bb5a92fef Mon Sep 17 00:00:00 2001 From: Miranda Marquez Date: Wed, 17 Jul 2024 19:39:12 -0800 Subject: [PATCH] make line numbers always be working --- init.el | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/init.el b/init.el index c55bfba..a2b8db9 100644 --- a/init.el +++ b/init.el @@ -670,8 +670,8 @@ targets." :hook (prog-mode . nlinum-relative-mode) :init (defun mir/nlinum-buffer-setup () - (nlinum-relative-mode -1) - (nlinum-relative-mode 99) + ;; (nlinum-relative-mode -1) + ;; (nlinum-relative-mode 99) (setq nlinum-format-function (lambda (line width) (let* ((line-display (abs (- line nlinum-relative--current-line))) @@ -696,7 +696,9 @@ targets." str))) (setq-local nlinum--width (length (number-to-string (line-number-at-pos (point-max)))))) - (add-hook 'minibuffer-exit-hook #'mir/nlinum-buffer-setup)) + (add-hook 'nlinum-relative-mode-hook #'mir/nlinum-buffer-setup) + ;; (add-hook 'minibuffer-exit-hook #'mir/nlinum-buffer-setup) + ) ;; Better modeline? Better modeline. (use-package powerline