make line numbers always be working

This commit is contained in:
Miranda Marquez 2024-07-17 19:39:12 -08:00
parent eb6282b304
commit ca572a288b

View File

@ -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