 (require 'linum)
 (require 'nlinum)
 (require 'init-prefs)
+(unless (version< emacs-version "26.1")
+  (require 'display-line-numbers))
 
 (defun nlinum--setup-window-fudge ()
   "Workaround a bug in older versions of Emacs"


      ((and (fboundp 'global-linum-mode)
            (eq exordium-display-line-numbers t))
       ;; Use linum - non-lazy mode for line numbers
       ;;
       ;; Make line numbers display correctly when user zooms with C-+/C--
       ;; FIXME: this is broken, just a workaround for now.
       (when (facep 'linum-highlight-face)
         (let ((h (face-attribute 'default :height)))
           (set-face-attribute 'linum nil :height h)
           (set-face-attribute 'linum-highlight-face nil :height h)))
       ;;
       ;; Turn on linum
       (global-linum-mode t)

       (defadvice linum-on (around linum-on-inhibit-for-modes)
         "Stop the load of linum-mode for some major modes."
         (unless (exordium-inhibit-line-numbers-p)
           ad-do-it))
       (ad-activate 'linum-on)))

(provide 'init-linum)

                        (cdr (window-margins)))))

(defun exordium-inhibit-line-numbers-p ()
  (or (minibufferp)
      (and exordium-inhibit-line-numbers-modes
           (cl-member major-mode exordium-inhibit-line-numbers-modes))
      (and exordium-inhibit-line-numbers-star-buffers
           (eq 0 (string-match "*" (buffer-name))))
      (and exordium-inhibit-line-numbers-buffer-size
           (> (buffer-size) exordium-inhibit-line-numbers-buffer-size))
      ;; taken from linum.el
      (and (daemonp) (null (frame-parameter nil 'client)))))

;;;###autoload
(define-globalized-minor-mode exordium-global-nlinum-mode
  nlinum-mode
  (lambda () (unless (exordium-inhibit-line-numbers-p)
               (nlinum-mode))))
;;;###autoload
(define-globalized-minor-mode exordium-global-display-line-numbers-mode
  display-line-numbers-mode
  (lambda () (unless (exordium-inhibit-line-numbers-p)
              (display-line-numbers-mode))))

(cond ((and (fboundp 'global-nlinum-mode)
            (eq exordium-display-line-numbers :nlinum))
