This repository has been archived on 2024-10-22. You can view files and clone it, but cannot push or open issues or pull requests.
spacemacs/layers/+misc/nlinum/README.org

21 lines
694 B
Org Mode
Raw Normal View History

2017-04-25 15:42:58 +00:00
#+TITLE: nlinum layer
2019-05-02 21:49:30 +00:00
#+TAGS: layer|misc
2019-05-07 20:05:06 +00:00
* Table of Contents :TOC_5_gh:noexport:
2017-05-22 14:16:12 +00:00
- [[#description][Description]]
- [[#features][Features:]]
2017-04-25 15:42:58 +00:00
* Description
Add support for native line numbers in Emacs 26 Emacs 26.1 will introduce a new native line numbers feature: "display-line-numbers". It includes relative line numbers, is faster than current linum-mode, and doesn't use the margin area (it has its own area). So yeah, we want to use the new feature when possible. No changes are required on the user side, except for Emacs 26 users are recommended to remove nlinum layer from their configuration (if they have enabled it). With this change: - Emacs 26: - uses display-line-numbers by default. - linum and linum-relative packages are excluded. - Emacs 25: - does NOT use display-line-numbers. - continues to use linum and linum-relative. - nlinum layer: - can still be used as before in Emacs 25. - is NOT recommended in Emacs 26, but can be used. - when enabled, excludes display-line-numbers. Also contains some bug fixes: Fixes a bug where setting `dostpacemacs-line-numbers` to `t` or `relative` enabled line numbers in every buffer, instead of only in buffers that derive from prog-mode and text-mode. Likewise fixes a bug where specifying `:enabled-for-modes nil` (or not specifying `:enabled-for-modes` at all) in `dotspacemacs-line-numbers` settings meant "enable in all modes" instead of "enable in modes derived from prog-mode or text-mode". Because of this change, also adds a way for users to enable line numbers in *all* buffers. Removes check for special buffer. All our current checks should be enough to enable line numbers only where it makes sense. Disabling in all special buffers is not necessary.
2018-05-10 17:10:31 +00:00
This layer provides various styles of line numbering in Spacemacs. It replaces
=linum= and =linum-relative= with the improved =nlinum= and =nlinum-relative=
packages.
Please note that on Emacs 26 and newer, this layer also replaces the new native
line numbers mode (=display-line-numbers-mode=), and because of that it is not
recommended to use =nlinum= layer on Emacs 26 or newer.
** Features:
- Support for classic ascending line numbering.
- Support for line numbering relative to the current cursor position.