Commit Graph

80 Commits

Author SHA1 Message Date
b29449434b nit(evil): revise & reformat comments
For clarity and to conform to newer conventions.
2025-03-25 15:22:15 -04:00
0a715cc3f2 refactor: (if|when)-let -> (if|when)-let*
With the former macros' future in the air (and likely to be targeted in
future, potentially breaking changes), I'll deal with this now than have
it bite me later.

Ref: https://lists.gnu.org/archive/html/emacs-devel/2024-10/msg00637.html
2025-01-08 19:33:37 -05:00
6671adc687 refactor!: move helpful from :core to :lang emacs-lisp
BREAKING CHANGE: This moves helpful.el out of core into :lang
emacs-lisp. Since most (all) people have this module enabled, this
shouldn't make a difference for most people, but if you're one of the
few that don't have :lang emacs-lisp enabled, Doom will revert to using
Emacs' built-in help.el and describe-* commands.

Others can also disable helpful with (package! helpful :disable t) if
they prefer Emacs' built-in help system, which wasn't possible before,
because it was a core package.

This was done as part of an ongoing effort to slim down Doom's core in
preparation for v3.
2024-08-30 02:26:41 -04:00
04efd82590 feat(evil): optionally wrap move-window commands
Introduces an `+evil-want-move-window-to-wrap-around` option. If
non-nil, `+evil/window-move-*` commands will wrap around the frame. If
these commands are passed the prefix arg, behave as if
`+evil-want-move-window-to-wrap-around` were inverted (just once).

Close: #7218
Co-authored-by: agzam <agzam@users.noreply.github.com>
2024-07-29 18:51:50 -04:00
e43d575caf refactor(lib): don't use smartparens' API
Toward our eventual goal of moving smartparens out of core, I've adapted
this from code provided by hpfr on Discord, which was adapted from
smartparen's syntax-ppss caching logic. `:config default` will need need
some attention before we can fully move smartparens to its own `:editor
smartparens` module.

Co-authored-by: hpfr <hpfr@users.noreply.github.com>
2024-07-09 20:55:29 -04:00
2bfb7821b6 refactor(evil): +evil--window-swap: no-op if on edge
Also error checks DIRECTION, just in case.
2024-07-05 20:10:57 -04:00
9620bb45ac fix(evil): ]f/[f opening broken symlinks 2024-04-18 14:20:48 -04:00
20cdba39a8 fix(evil): more reliable window detection
At some point `windmove-find-other-window` stopped loading reliably,
such that `SPC w H` would complain of a missing symbol. Indeed
navigating to the implementation of `windmove` within Emacs's Lisp we
find warnings that it has mostly been superceded by newer window APIs
since 2013, and is implemented in terms of `window-in-direction`.

By using `window-in-direction` directly, the loading problem disappears.
2023-09-12 21:20:23 +02:00
21df7d0beb bump: :editor evil
cute-jumper/evil-embrace.el@7b5a539cfe -> cute-jumper/evil-embrace.el@3081d37811
emacs-evil/evil-collection@aaf3e0038e -> emacs-evil/evil-collection@1ad283f5b7
emacs-evil/evil-surround@f273821f57 -> emacs-evil/evil-surround@8fad8540c4
emacs-evil/evil@2ce03d412c -> emacs-evil/evil@60ba716bf5
mamapanda/evil-traces@290b532354 -> mamapanda/evil-traces@d4c53bd6ad
redguardtoo/evil-nerd-commenter@8c0f23d46a -> redguardtoo/evil-nerd-commenter@3b197a2b55

Ref: mamapanda/evil-traces#5
Ref: cute-jumper/evil-embrace.el#10
2023-08-20 22:16:12 +02:00
057e6c531c refactor: replace doom-enlist with ensure-list
doom-enlist is now a deprecated alias for ensure-list, which is built
into Emacs 28.1+ and is its drop-in replacement. We've already
backported it for 27.x users in doom-lib (in 4bf4978).

Ref: 4bf49785fd
2022-08-07 19:43:13 +02:00
d0cdf8f5c6 fix(evil): ]f/[f opening directories
They should traverse files, not directories.
2022-06-13 01:16:22 +02:00
488ad07cc5 fix(evil): define *-any-quote directly
Defining `*-any-quote` objects via the exiting `*-block` helpers leads
to incorrect behaviour, where the trailing boundary is also included as
part of the selection (cursor on `|`, selection between `|`):

```
start: "te|st"
v i q: "|test"|
```

The expected behaviour is the same as `v i "`:
```
start: "te|st"
v i q: "|test|"
```

Fix: #5698
2022-04-25 16:38:40 +02:00
d833242de7 fix(evil): +evil/next-preproc-statement -> +evil/next-preproc-directive
+evil/next-preproc-statement does not exist.

Ref: 83387d89e9
2022-02-10 04:07:16 +01:00
1d41ee0c1a refactor(evil): use window-swap-states in +evil--window-swap
Taking a look at the built in windmove functions shows that Emacs has a
built in function for swapping windows called `window-swap-states`.
Using this ensures the window state is maintained.

Ref: #6023
Co-authored-by: luveti <luveti@users.noreply.github.com>
2022-01-27 03:43:51 +01:00
Dan
1643124104 fix(evil): window-selection-change-functions use case
`window-selection-change-functions` expects hooks to have one argument.
2022-01-27 03:33:13 +01:00
c09777b36b fix(evil): handle edge cases of embrace
If the surround key is `\(`, the text should be surrounded as
`\( text \)`. The same for `\[` and `\{`.
2021-11-25 01:45:09 +01:00
0bb4d4dfcb refactor: switch buffer/frame/window hooks
Emacs 27 introduced a bunch of `window-*-change-functions` hooks,
including `window-selection-change-functions` and
`window-buffer-change-functions`, which handles 98% of the use case for
Doom's `doom-switch-{buffer,window,frame}-hook` hooks, so I've rewritten
them to use them under the hood, which amounts to simpler code and fewer
hacks.
2021-10-10 18:36:46 +02:00
45c759d7d7 fix(evil): evil-join fails to join commented lines
Fix #5558
2021-10-05 02:33:15 +02:00
06392a723f refactor: rename orig-fn arg in advice to fn
A minor tweak to our naming conventions for the first argument of an
:around advice.
2021-08-04 01:53:12 -04:00
bd94250503 Fix #5113: "defining as dynamic an already lexical var" error
Due to a dynamic variable being let-bound while evil-textobj-anyblock is
loading, so load it first.
2021-05-30 12:21:13 -04:00
e33b21dc46 Fix #4770: New window is focused after split
According to the documentation of `evil-window-split` the variable
`evil-split-window-below` needs to be non-nil for the new window to be
created below; and for `evil-window-vsplit` it is the variable
`evil-vsplit-window-right` that needs to be non-nil for the window to be
created on the right.
2021-03-10 15:48:31 +01:00
2a4509c42a editor/evil: fix typo in +evil-window-split-and-follow
And conform these commands to naming conventions.
2021-03-06 10:31:10 -05:00
0917187f20 editor/evil: bind C-w {S,V} to split-and-follow 2021-03-06 09:59:50 -05:00
c049480cbd Fix evil-join filling non-comments poorly 2021-02-25 13:59:43 -05:00
6c163d77d9 Fix +evil:retab 2021-02-02 02:38:12 +01:00
198712060a Fix +evil--insert-new-line advice when opening new line inside a comment.
`comment-line-break-function` requires a single `soft-newlines` argument.
2021-01-17 15:53:23 +02:00
6970903a43 Fix #4465: >,< not shifting whole lines
This fixes make > and < behave as it does in vim in regular visual mode.
2021-01-03 17:18:43 -05:00
765b6dcfca Unset unused markers
In case of overlay leaks.
2020-12-12 15:56:36 -05:00
d149c59d2e Add emacs mode checks to insert mode checks
This is to accommodate users who default to emacs mode, rather than
insert mode. The two are also very alike, so many of these checks should
apply to both (almost) equally.
2020-12-11 17:38:09 -05:00
d21d86aafc Add single quotes to ‘any quote’ text objects 2020-10-28 08:48:01 +01:00
164b997cb0 Add q text-object for all quotes 2020-10-27 23:18:06 -04:00
40cf6139ed Make evil-join remove comment delimiters
See emacs-evil/evil#606
2020-08-09 01:50:41 -04:00
d12752324a Introduce letf! convenience macro
A more succinct cl-letf, which allows for local functions and macros.
2020-04-29 23:48:21 -04:00
c1127a5bde Rewrite move/copy/delete file commands
To use rename-file, copy-file and delete-file, so these commands can
enjoy the benefits of any plugins that have advised these, like org-roam
does for rename-file.
2020-04-27 01:51:18 -04:00
50ff934ff2 Fix #2832: filename modifiers replaced with empty strings 2020-04-26 04:12:33 -04:00
bce0cc2152 Change how evil-easymotion is lazy loaded
Fixes an issue where gs wouldn't work after an operator.
2020-04-14 15:41:54 -04:00
427ed2bbc0 Fix +evil:defun-txtobj docstring 2020-03-23 18:23:22 +01:00
fcac85fc86 Make +evil:copy-this-file autoload interactively 2020-03-03 20:02:07 +02:00
888d456dc9 Fix #2524: :make executing wrong command 2020-02-20 17:42:58 -05:00
dbf9c92b48 Fix +evil-resolve-vim-path-a not removing excess backslashes 2020-02-20 00:51:55 -05:00
1575300ad4 Add iu/au text-object for urls #2484 2020-02-04 13:58:43 -05:00
fe0c5e135d Fix #2293: easymotion with evil operators
Reverts fix for #1672, but provides a workaround:

  (map! :n "gl" (λ! (+evil/easymotion 'normal 'global)))
2020-01-28 17:50:11 -05:00
1b779bf716 Fix evil ex fname modifiers consuming char just before #/%
':e test-%:t.el' in filename.el should open test-filename.el, but
instead opened testfilename.el.
2020-01-20 19:14:25 -05:00
dcb0b6042e Ensure evil-easymotion is lazy-loaded
The evilem-create calls were pulling it in early, at startup.
2019-12-27 01:54:01 -05:00
d1f4a77fbb Fix vestigial reference to old help-search-headings fn 2019-12-26 16:50:49 -05:00
adc8cba14b Revise docstrings & minor reformatting 2019-12-26 01:41:44 -05:00
baae6b1711 Rename +evil/paste-preserve-register => +evil/alt-paste
Now does the invers of evil-kill-on-visual-paste
2019-12-21 03:59:46 -05:00
27cabea6b6 Fix gs in org-mode #2218
Also makes +evil/easymotion generic; it can now be moved to any key, and
new keys can be added to the <easymotion> event, rather than having to
wait for evilem-map to become available.

Also fixes +org/goto-visible if used before avy is loaded.

Relevant to #1672
2019-12-20 13:40:06 -05:00
199a6fab79 Fix typos 2019-12-01 22:31:19 -05:00
26c8f5c6ef Bytecompiler bytecompiler, won't you shut up 2019-11-23 01:21:25 -05:00