Commit graph

64 commits

Author SHA1 Message Date
bmag 8f82486154 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-28 19:29:15 +03:00
smile13241324 106b27f52e Deactivate evil-escape in holy-mode 2018-05-27 22:37:48 +03:00
syl20bnr 0fa3658cd8 reorganize spacemacs-base distribution into +spacemacs/spacemacs-xxx
This idea is to have the spacemacs-base distribution only configure defaults for
built-in packages. Those buit-in packages are now configured in the new layer
spacemacs-defaults.
Additionally some other packages of spacemacs-base have been dispatched to
better suiting spacemacs layers.

Projectile has been moved to the new layer spacemacs-project

- Move the following packages to bootsrap distributio layer:
  - exec-path-from-shell
  - evil-evilified-state
  - holy-mode
  - hybrid-mode
  - spacemacs-theme
- ace-window has been moved to spacemacs-navigation
- centered-buffer-mode has been moved to spacemacs-editing-visual
- pcre2el has been moved to spacemacs-editing
- evil-escape and evil-visualstar have been moved to spacemacs-evil
2018-03-04 20:54:54 -05:00
syl20bnr ebe4c60264 Revert "Defer packages by default using use-package-always-defer"
This reverts commit 29c78ce841 and all other fixes
that have been made afterwards.

The motivation is that use-package is seen by many as a replacement for
`require`. Is use-package always defer the loading of packages then is breaks
this use case, this does not respect POLA so even if it was making Spacemacs
loading faster (up to 3s faster on some startup on my machine) we just cannot
use it, it would be irresponsible. Spacemacs should be easy to use, loading
performance will come with time but it is not a priority.
2018-03-03 23:40:10 -05:00
bmag f84ab9af8f u-p-always-defer fix regress: spacemacs-evil, spacemacs-editing
These changes were missed in commit 29c78ce841
2018-03-03 14:17:01 +02:00
syl20bnr 29c78ce841 Defer packages by default using use-package-always-defer
Warning now `:defer t` is implied, to force a package to load `:demand t` is
now necessary.
2018-02-27 23:32:52 -05:00
smile13241324 d526121202 Fix doc for first bunch of internal spacemacs layers 2018-02-22 17:36:45 +02:00
duianto 25fa9b0a50 Format spacemacs-evil/packages.el max 80 chars 2018-01-20 10:41:43 -05:00
Benjamin Reynolds 93d2fa6f9c evil-mc: Fix misaligned cursors on macOS and Windows
See #8641
See also gabesoft/evil-mc#49
2018-01-18 01:20:12 -05:00
syl20bnr 326965d4ce Happy New Year 2018! 2018-01-04 02:00:25 -05:00
syl20bnr 2cb98447af Move evil-cleverparens to spacemacs-evil with major mode toggle
Delete layer evil-cleverparens and move the package to spacemacs-evil layer.

The feature is called "Safe structurral editing" for lisp dialects. Support for
it is added via pre-init functions in each of the concerned layer and proper
documentation is added to their README.org files.

This also removes the recently added package evil-smartparens. The goal is
to choose the best package for evil safe structural editing. For now we use
evil-cleverparens as we supported it first, if evil-smartparens is shown to be
a better package we will be able to switch to it.
2018-01-04 01:40:52 -05:00
duianto d1b699fceb Clear both / and C-s search highlights with :noh
Clear both `/` and `C-s` search highlights with `:noh` and `:nohlsearch`,
and group the clear highlight commands next to each other.
2017-12-17 15:19:26 -05:00
duianto 622ae00aff Clear both / and C-s search highlights with SPC s c
When `evil-search-module` is set to:
evil-search:
Then `/` search highlights are cleared by pressing: `SPC s c`,
and `C-s` highlights are cleared with `:noh`.

isearch:
Then `/` highlights are cleared with `M-x evil-ex-nohighlight`,
and `C-s` highlights are cleared with both `SPC s c` and `:noh`.
2017-08-27 22:12:04 -04:00
syl20bnr e2e532bb49 core: change <function>p to <function>-p suffixes for consistency
Also defined aliases for backward compatibility with `usedp` functions.
2017-07-02 10:09:39 -04:00
Nicholas Ochiel eb5e6ed920 Fix issue #8823: evil-paste-pop doesn't work
previous command was not an evil-paste.
2017-06-12 12:29:39 +02:00
braham 1dd0942745 spacemacs/evil-mc-paste-{before,after}: fix multiple cursor paste
* restore these functions' signatures to those of their stock evil
  counterparts (evil-paste-{before,after}), allowing
  `evil-mc-execute-evil-paste` to paste at each cursor when there
  are multiple instead of pasting at only one cursor

* retain these functions' ability to directly take a register as
  input when called interactively

* regression was caused by bfb565eea9
2017-06-06 12:19:49 +02:00
duianto aada9702dc init-evil-mc: 1 cursor hide mode line text variable
Problem:
Spacemacs rewrites the evil-mc-mode-line variable, to remove the evil-mc mode
line text, when there's only one cursor. The rewrite blocks the recent evil-mc
updates, that made the multi cursor, mode line text, more readable.

Solution:
Use the new evil-mc-one-cursor-show-mode-line-text variable, to only hide the
mode line text, when there's one cursor. This unblocks the current, and any
future updates, that the evil-mc package makes to the mode line text.
2017-05-24 13:32:25 +02:00
Eivind Fonn 5290456304 Modify evil-lion config
- Adjust keys not to collide with evil-little-word
- Add documentation
2017-05-23 11:08:06 +02:00
James Wang 3661ac1937 Add evil-lion 2017-05-23 11:02:23 +02:00
JAremko 6c5a0b2b14 update docs to the new toc-org format 2017-05-22 18:35:37 +03:00
Vladimir Kochnev 962cb03a85 Fix frame cycling in evil-unimpaired.
`raise-frame` does not set input focus on selected frame.
2017-05-18 18:34:56 +02:00
JAremko c1e4556882 Format and cleanup docs. Fix links. 2017-04-28 23:29:14 -04:00
Robbert van der Helm bfb565eea9 Fix pasting ignoring register selection
Pasting in evil-mode has been broken since
`58458f2d2abcc1211444c2060ab598f55e518da4`, as `p` and `P` would always paste
from the unnamed register instead of the register selected with `"`. I've
removed the function's second parameter, as it wasn't being used anywhere.

Fixes #8759
2017-04-28 23:09:06 -04:00
MadAnd 1f8c41059a Fix signatures of spacemacs/evil-mc-paste-{after,before}
Fixes #8672
2017-04-12 23:20:04 -04:00
syl20bnr c17722ba96 Fix void: evil-mc-get-cursor-count when pasting
Fixes #8672
2017-04-10 23:40:14 -04:00
syl20bnr fed06956e3 Move evil-mc functions to funcs.el 2017-04-09 23:22:12 -04:00
Koray Al 58458f2d2a Disable paste transient state when multiple cursors are active
evil-mc has no support for the 'paste transient state', hence we should fall back
to the default version during that period.
2017-04-09 23:15:53 -04:00
syl20bnr 3f1bb43597 Move evil-declare-ignore-repeat to evil init function 2017-04-09 17:25:57 -04:00
Robbert van der Helm 98584205ce Fix repeating jumping to errors using the '.' command #8083
The unimpaired keybindings `[ q` and `] q` can be used to jump to flycheck
errors in the current buffer. Because evil-repeat treated them as regular
operations, they were repeated when pressing the `.` key. This made it harder to
rename multiple erroneous variables.
2017-04-09 17:21:52 -04:00
duianto 92751fdcfb Update packages.el, remove trailing white space
My previous commit left behind a trailing white space.
2017-03-05 21:42:47 +02:00
syl20bnr d5d80eb1a1 line-number: fix backward compatibility
There was an error in `linum-on` when `dotspacemacs-line-numbers` was set to
`'relative`.

- new function `spacemacs//linum-backward-compabitility` to test for old
supported values.
- Use an :around advice for `linum-on` instead of redefining it.
- move linum init time config to `:init` section of `use-package`
- fix relative linum initialization by testing if `dotspacemacs-line-numbers` is
  a list first.
2017-02-05 13:50:50 -05:00
deb0ch a28e17c4d3 line numbers: finer configuration of line numbers activation 2017-02-05 12:47:19 -05:00
syl20bnr fb27ede558 Bump year in copyright headers
Happy New Year 2017!
2017-01-05 23:08:17 -05:00
duianto af3445950f Evil Nr TS, add 0..9 prefix and q quit
This implements the changes in: #7013
Add "[0..9] prefix" and "[q] quit", and separates the keys by 2 spaces.
2016-10-17 19:57:57 +02:00
deb0ch ddbee36ad6 Activating linum-relative now activates linum 2016-10-17 15:05:44 +02:00
bmag 3fc32063c7 Move vi-tilde aux functions to spacemacs-evil
spacemacs/disable-vi-tilde-fringe and
spacemacs/disable-vi-tilde-fringe-read-only are used by spacemacs-evil,
but were defined in spacemacs-ui-visual. Move the definitions to the
correct place.
2016-10-17 13:47:23 +02:00
Eivind Fonn 4233ffaecc Fix #6704: don’t use evil-open-below/above
- Also add counts
2016-08-05 21:31:43 +02:00
bmag fe60d0fc1e Set buffer-predicate to spacemacs/useful-buffer-p
Prevent next-buffer, other-buffer, etc. from choosing useless buffers.
No need for spacemacs/next-useful-buffer,
spacemacs/previous-useful-buffer anymore.

Also fix spacemacs/alternate-buffer to respect buffer-predicate.

When spacemacs-layouts is used, buffer-predicate filters useful buffer
that belong to the current layout.
2016-07-25 20:02:28 +09:00
Eivind Fonn 8e87132ba7 Fix possibly calling bad code after theme change 2016-07-25 14:00:02 +09:00
d12frosted 41baea8744
install evil-unimpaired using quelpa
And properly setup dependencies.

Fixes #6523
Suppresses #6559
2016-07-15 15:14:04 +03:00
syl20bnr 653da2a6aa highlight-persist/smartparens overlay: better adaptive face
Choose to inherit from face lazy-highlight instead of region.
Ideally a theme should not set lazy-highlight to the same face as
region.

Also move some function to funcs.el and remove some empty lines.
2016-07-13 10:22:03 -04:00
syl20bnr 9499e24197 Comment evil-terminal-cursor-changer instead of excluding it
We should not exclude packages just to disable their config and
preventing them from being installed.
2016-07-06 22:49:24 -04:00
MadAnd c98f862174 Extract evil-unimpaired as a local package 2016-07-06 21:22:16 -04:00
MadAnd dd9c967825 Support Hybrid state in Iedit Insert state 2016-07-05 00:23:16 -04:00
syl20bnr 50d5cdd054 Fix error with which-key--buffer on startup
Use the hook instead.
Fixes #6358
2016-06-18 00:19:59 -04:00
syl20bnr e1826c9382 Disable vi tilde fringe in which-key buffer 2016-06-13 00:39:08 -04:00
syl20bnr 51b413dde0 Diminish evil-mc prefix in mode-line 2016-06-02 22:47:37 -04:00
Eivind Fonn 62fc64f745 core: special toggle API for minor modes 2016-05-31 22:33:44 -04:00
syl20bnr fd756a124e New layer nlinum + revert default support for linum
To use nlinum + nlinum-relative add the nlinum layer

Note: there are still work to do on nlinum-relative, at some point we
may replace linum by nlinum completely.
2016-05-20 23:57:32 -04:00
syl20bnr 156cead380 Revert "Experimenting with 0.2 delay to redraw relative line number"
This reverts commit 8fd78b06f3.
2016-05-19 14:33:36 -04:00