mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-29 14:33:34 -05:00
Don't enable nlinum in org-mode
This commit is contained in:
@@ -111,17 +111,18 @@
|
|||||||
(defvar nlinum-format " %3d ")
|
(defvar nlinum-format " %3d ")
|
||||||
:init
|
:init
|
||||||
(defface linum-highlight-face '((t (:inherit linum))) "Face for line highlights")
|
(defface linum-highlight-face '((t (:inherit linum))) "Face for line highlights")
|
||||||
|
|
||||||
(defun narf|nlinum-enable ()
|
(defun narf|nlinum-enable ()
|
||||||
(nlinum-mode +1)
|
(nlinum-mode +1)
|
||||||
(add-hook! post-command 'narf|nlinum-hl-line))
|
(add-hook! post-command 'narf|nlinum-hl-line))
|
||||||
|
|
||||||
(defun narf|nlinum-disable ()
|
(defun narf|nlinum-disable ()
|
||||||
(nlinum-mode -1)
|
(nlinum-mode -1)
|
||||||
(remove-hook 'post-command-hook 'narf|nlinum-hl-line)
|
(remove-hook 'post-command-hook 'narf|nlinum-hl-line)
|
||||||
(narf|nlinum-unhl-line))
|
(narf|nlinum-unhl-line))
|
||||||
|
|
||||||
;; Preset width nlinum
|
;; Preset width nlinum
|
||||||
(add-hook! (text-mode prog-mode scss-mode web-mode) 'narf|nlinum-enable)
|
(add-hook! (markdown-mode prog-mode scss-mode web-mode) 'narf|nlinum-enable)
|
||||||
(add-hook! org-mode 'narf|nlinum-disable)
|
|
||||||
:config
|
:config
|
||||||
(defun narf|nlinum-unhl-line ()
|
(defun narf|nlinum-unhl-line ()
|
||||||
"Highlight line number"
|
"Highlight line number"
|
||||||
|
Reference in New Issue
Block a user