make line numbers always be working
This commit is contained in:
parent
eb6282b304
commit
ca572a288b
8
init.el
8
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
|
||||
|
Loading…
Reference in New Issue
Block a user