emacs.d

My emacs configuration, done in a literate programming fashion using org-mode

git clone git://git.shimmy1996.com/emacs.d.git
commit 21f19bdfdf9a0db66896048f0150b2ab9eeb9e1e
parent 0a92abb6ae95bf78f0caec66e286df5c28c98a6b
Author: Shimmy Xu <shimmy.xu@shimmy1996.com>
Date:   Tue, 19 Jun 2018 17:48:55 -0500

Use built-in display-line-numbers in Emacs 26.1 instead of linum.

Diffstat:
MREADME.org | 33+++++----------------------------
1 file changed, 5 insertions(+), 28 deletions(-)
diff --git a/README.org b/README.org
@@ -189,35 +189,12 @@ Enable line highlighting.
 #+END_SRC
 
 ** Line Numbering
-Enable line numbering for =prog-mode= and org/LaTeX because DocView breaks =linum=.
-
-#+BEGIN_SRC emacs-lisp
-  (add-hook 'prog-mode-hook 'linum-on)
-  (add-hook 'org-mode-hook 'linum-on)
-  (add-hook 'LaTeX-mode-hook 'linum-on)
-#+END_SRC
-
-Install relative line numbering support for =prog-mode=.
-
-#+BEGIN_SRC emacs-lisp
-  (use-package linum-relative
-    :ensure t
-    :init
-    (add-hook 'prog-mode-hook 'linum-relative-on)
-    (add-hook 'org-mode-hook 'linum-relative-on)
-    (add-hook 'LaTeX-mode-hook 'linum-relative-on))
-#+END_SRC
-
-Display current line number instead of 0.
-
-#+BEGIN_SRC emacs-lisp
-  (setq linum-relative-current-symbol "")
-#+END_SRC
-
-Force width of line numbering bar to 3 digit wide.
-
+Use =display-line-numbers= instead of =linum=.
+Enable relative line numbering, and set minimum width to 3.
 #+BEGIN_SRC emacs-lisp
-  (setq linum-format "%3d")
+  (setq-default display-line-numbers-type (quote relative))
+  (setq-default display-line-numbers-width 3)
+  (global-display-line-numbers-mode)
 #+END_SRC
 
 ** Line Wrapping