[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Native display of line numbers

From: James Nguyen
Subject: Re: Native display of line numbers
Date: Mon, 19 Jun 2017 09:33:04 -0700

>> Overlays or just company-mode and its likes?  If the former, can you
>> show a simple recipe to demonstrate the problems with overlays?

I’m not sure, but I included a snippet for company-mode.

#+begin_src emacs-lisp :tangle yes

  (let ((default-directory "~/.emacs.d/"))

  ;; M-x list-packages U x to upgrade packages.
  (setq package-list '(diminish))

  ;; Disable in favor of `use-package'.
  (setq package-enable-at-startup nil)

  ;; Package Repositories
  (setq package-archives '(("melpa" . "https://melpa.org/packages/";)
                           ("gnu" . "https://elpa.gnu.org/packages/";)))

  ;; Activate all packages (in particular autoloads).

  ;; Bootstrap `use-package'.
  (unless (package-installed-p 'use-package)
    (package-install 'use-package))

    (require 'use-package))
  (require 'diminish) ; for :diminish
  (require 'bind-key) ; for :bind

  ;; Install package if not existing.
  (setq use-package-always-ensure nil)

  ;; Check loading times with `use-package'.
  (setq use-package-verbose t)

  ;; Fetch the list of packages when unavailable.
  (when (not package-archive-contents)

  ;; Install any missing packages.
  (dolist (package package-list)
    (when (not (package-installed-p package))
      (package-install package)))

  (use-package company
    :ensure t
    (setq company-echo-delay 1)
    (setq company-minimum-prefix-length 1)

  (setq-default display-line-numbers 'relative)
  ;; Type a few characters to trigger autocompletion

>> Scrolling with what command(s)?

#+begin_src emacs-lisp :tangle yes
(setq scroll-margin 5
      scroll-step 1
      scroll-conservatively 10000
      scroll-preserve-screen-position 1)

(setq mouse-wheel-scroll-amount '(1))
(setq mouse-wheel-progressive-speed nil)
(setq mouse-wheel-follow-mouse 't)
(setq-default display-line-numbers 'relative)

;; Emacs -Q
;; Visit a file like xdisp.c.
;; Scroll up and down with touchpad in the middle of the file.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]