mirror of
https://github.com/Foltik/dotfiles
synced 2024-11-30 14:32:08 -05:00
Use display-line-numbers instead of nlinum
This commit is contained in:
parent
84c2283491
commit
f504d99475
@ -453,12 +453,15 @@ Show line and column numbers in the modeline.
|
|||||||
*** Line Numbers
|
*** Line Numbers
|
||||||
Use the default emacs relative line numbers, but switch to absolute lines when in insert mode.
|
Use the default emacs relative line numbers, but switch to absolute lines when in insert mode.
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(use-package nlinum-relative
|
(add-hook 'prog-mode-hook (lambda () (setq display-line-numbers 'absolute)))
|
||||||
:config
|
(add-hook 'evil-insert-state-entry-hook (lambda () (when (bound-and-true-p display-line-numbers) (setq display-line-numbers 'absolute))))
|
||||||
(nlinum-relative-setup-evil)
|
(add-hook 'evil-insert-state-exit-hook (lambda () (when (bound-and-true-p display-line-numbers) (setq display-line-numbers 'relative))))
|
||||||
:hook (prog-mode . nlinum-relative-mode))
|
(add-hook 'evil-normal-state-entry-hook (lambda () (when (bound-and-true-p display-line-numbers) (setq display-line-numbers 'relative))))
|
||||||
|
(add-hook 'evil-normal-state-entry-hook (lambda () (when (bound-and-true-p display-line-numbers) (setq display-line-numbers 'absolute))))
|
||||||
|
(add-hook 'evil-visual-state-entry-hook (lambda () (when (bound-and-true-p display-line-numbers) (setq display-line-numbers 'relative))))
|
||||||
|
(add-hook 'evil-visual-state-entry-hook (lambda () (when (bound-and-true-p display-line-numbers) (setq display-line-numbers 'absolute))))
|
||||||
|
(add-hook 'display-line-numbers-hook (lambda () (when (evil-normal-state-p) (setq display-line-numbers 'relative))))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
*** Show Matching Parens
|
*** Show Matching Parens
|
||||||
Shows matching parenthesis
|
Shows matching parenthesis
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
|
Loading…
Reference in New Issue
Block a user