Commit graph

173 commits

Author SHA1 Message Date
Henrik Lissner
771fccc52b
nit: minor reformatting & revision
Also corrects the version string of obsolete variable `+mu4e-backend`.
2024-09-11 19:46:14 -04:00
Henrik Lissner
8c4d871f7c
fix(evil): respect evil-disable-insert-state-bindings 2024-08-30 03:15:43 -04:00
Henrik Lissner
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
Henrik Lissner
4f5f9d6065
refactor(evil): remove unused +evil-repeat-keys variable 2024-08-26 17:03:04 -04:00
Henrik Lissner
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
Henrik Lissner
69f4b70069
fix(evil): remove gA keybind
I was working on a +lookup/assignments around the time I introduced
+lookup/implementations, but I dropped it and forgot to remove this
keybind, which snuck in on f1d89bf.

Amend: f1d89bf9c2
2024-07-25 19:43:28 -04:00
Henrik Lissner
ce84690dc5
feat(evil): vim completion keybinds on C-x
Vim has a set of completion commands bound to the C-x prefix. We had
this for company, but with this commit, we now have them for the corfu
module.
2024-07-13 19:38:20 -04:00
Henrik Lissner
39ee7129ef
refactor(evil): remove unneeded advice
This was resolved upstream.

Fix: #2493
Ref: emacs-evil/evil#1268
2024-06-30 22:20:39 -04:00
StrawberryTea
2a875d9727
refactor(evil): remove lisp prefix-function embrace pair
A more generalized lisp prefix function was added upstream, so ours is
no longer needed.

Ref: cute-jumper/embrace.el#26
2023-11-24 11:00:52 -05:00
Amos Bird
ca9f84d664
fix(evil): add evil-embrace support for c++-ts-mode
In emacs-29, native tree-sitter adds new major modes for the C++
language, named c++-ts-mode. As a result, hooks in c++-mode will not
run. This commit adds the angle bracket fix hook for c++-ts-mode.
2023-09-09 23:59:06 +02:00
Henrik Lissner
9e9c7d9e6d
bump: :editor evil
edkolev/evil-lion@a55eb64742 -> edkolev/evil-lion@1e838a53b8
emacs-evil/evil@60ba716bf5 -> emacs-evil/evil@9eb69b7f5b
hlissner/evil-snipe@c07788c35c -> hlissner/evil-snipe@c2108d3932
mamapanda/evil-traces@d4c53bd6ad -> mamapanda/evil-traces@82e8a7b421

- Includes two fixes for breaking changes in evil:
  - mamapanda/evil-traces#5 (due to breaking changes in evil-ex.el)
  - emacs-evil/evil#1824 (due to removal of evil-unquote function)

Fix: mamapanda/evil-traces#5
Fix: emacs-evil/evil#1824
2023-08-21 18:09:02 +02:00
Henrik Lissner
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
Ellis Kenyo
435a383635 fix(evil): remap after eglot is loaded
evil-collection recently made some changes that map over our defaults
for evil
2023-07-22 16:41:13 +02:00
Henrik Lissner
cb6b065b87
fix(evil): embrace: escaped pairs in first org buffer
Close: #5423
2023-03-22 01:16:02 -04:00
Henrik Lissner
adb125f41f
fix(evil): persist evil state after mode changes
For example: when doom-guess-mode-h is triggered (see #7141), or when
the user invokes a mode function through M-x.

Fix: #7141
2023-03-11 10:54:22 -05:00
Henrik Lissner
7a2be67efa
refactor!: redesign module init/config hooks
BREAKING CHANGE: For consistency and correctness, I've renamed the
module init/config hooks, and added new ones:

- Adds doom-before-modules-config-hook
- Adds doom-after-modules-config-hook (replaced doom-before-init-modules-hook)
- Adds doom-before-modules-init-hook
- Adds doom-after-modules-init-hook (replaced doom-init-modules-hook)
- Removed doom-after-init-modules-hook (replaced w/ after-init-hook)

The old naming (and timing) was counterintuitive. Now, it's named after
the loaded file group (init.el vs config.el), and I added before/after
variants. Altogether, this should make them less ambiguous.

I've also moved some functions in various modules to more correct hooks.

Load order before this change:
- $EMACSDIR/early-init.el
- $EMACSDIR/lisp/doom.el
- $EMACSDIR/lisp/doom-start.el
- $DOOMDIR/init.el
- {$DOOMDIR,~/.emacs.d}/modules/*/*/init.el
- `doom-before-init-modules-hook'
- {$DOOMDIR,~/.emacs.d}/modules/*/*/config.el
- `doom-init-modules-hook'
- $DOOMDIR/config.el
- `doom-after-init-modules-hook'
- `after-init-hook'
- `emacs-startup-hook'
- `window-setup-hook'

Load order after this change:
- $EMACSDIR/early-init.el
- $EMACSDIR/lisp/doom.el
- $EMACSDIR/lisp/doom-start.el
- $DOOMDIR/init.el
- `doom-before-modules-init-hook'
- {$DOOMDIR,~/.emacs.d}/modules/*/*/init.el
- `doom-after-modules-init-hook'
- `doom-before-modules-config-hook'
- {$DOOMDIR,~/.emacs.d}/modules/*/*/config.el
- `doom-after-modules-config-hook'
- $DOOMDIR/config.el
- `after-init-hook'
- `emacs-startup-hook'
- `window-setup-hook'
2022-09-16 01:14:22 +02:00
Henrik Lissner
ad6a3d0f33
refactor: deprecate featurep! for modulep!
featurep! will be renamed modulep! in the future, so it's been
deprecated. They have identical interfaces, and can be replaced without
issue.

featurep! was never quite the right name for this macro. It implied that
it had some connection to featurep, which it doesn't (only that it was
similar in purpose; still, Doom modules are not features). To undo such
implications and be consistent with its namespace (and since we're
heading into a storm of breaking changes with the v3 release anyway),
now was the best opportunity to begin the transition.
2022-08-14 20:43:35 +02:00
Henrik Lissner
0407621aff
refactor: deprecate EMACS2[89]+, NATIVECOMP, MODULES
To reduce redundancy, remove the maintenance hassle that version
constants would impose later on, and rely on built-in
facilities (featurep) more over global variables or doomisms, these
global constants have been deprecated in favor of Emacs "features":

- EMACS28+   -- replace with (> emacs-major-version 27)
- EMACS29+   -- replace with (> emacs-major-version 28)
- NATIVECOMP -- replace with (featurep 'native-compile)
- MODULES    -- replace with (featurep 'dynamic-modules)

(These constants will be formally removed when v3 is released. The IS-*
constants are likely next, but I haven't decided on their substitutes
yet)

I also decided to follow native-compile's example and provide features
for Emacs' system features (since system-configuration-features' docs
outs itself as a poor method to detect features):

- dynamic-modules
- jansson
- native-compile -- this one already exists, but will instead be removed
  if it's non-functional; i.e. (native-comp-available-p) returns nil.

These are now detectable using featurep, which is fast and built-in.
2022-08-14 20:43:35 +02:00
Henrik Lissner
118f0c416a
refactor(evil): replace evil-visual-update-x-selection advice
With the new evil-visual-update-x-selection-p setting.

Also adds a more descriptive comment to this design choice.
2022-08-10 13:18:34 +02:00
Henrik Lissner
27a448b04b
feat(vc-gutter): add +diff-hl backend
This adds an alternative backend to the :ui vc-gutter module, enabled
with the +diff-hl flag. In the future, I intend for diff-hl to replace
git-gutter, as it is slightly faster and depends on more native
functionality (vc.el), but it's still a little buggy. It will remain
opt-in until those issues are sorted out.
2022-08-08 18:23:47 +02:00
ivanbrennan
90c510caca refactor(evil): remove evil-want-C-w-scroll
This appears to have been added accidentally in the following commit:
8b9d4a94bb

The codebase contains no references to it.
2022-08-02 20:36:59 +02:00
Henrik Lissner
31519d393a
bump: :editor evil
emacs-evil/evil-collection@e557188692 -> emacs-evil/evil-collection@6cc02b238c
emacs-evil/evil@3e41a82333 -> emacs-evil/evil@157af04d2c
hlissner/evil-snipe@a79177df40 -> hlissner/evil-snipe@c07788c35c
redguardtoo/evil-nerd-commenter@42ba1a473b -> redguardtoo/evil-nerd-commenter@386cd758a4
2022-06-17 18:21:23 +02:00
Quoc Huy Vu
0352ade454 fix(evil): correct typesetting quotations in latex
Use `evil-embrace` for typsetting quotations in latex instead of
`evil-surround`.
2021-11-30 14:05:57 +01:00
Artem Smaznov
68c5336972
fix(evil): disable evil-snipe in dired (#5417)
Fix #3359
2021-10-07 03:11:03 +02:00
Henrik Lissner
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
Wetlize
e12519d250 editor/evil: Add gr keybinding to refresh helpful buffers 2021-07-25 22:36:01 +03:00
Henrik Lissner
39e39d7f3f Bind gO -> imenu
In Neovim, gO is bound to "open outline for current buffer". Emacs'
analogue for this is imenu. Plus, evil has no default keybind for gO.
2021-07-23 15:44:12 -04:00
Henrik Lissner
751569f545 Fix +tabs:previous-or-goto typo 2021-06-06 17:49:26 -04:00
Henrik Lissner
47bce8856d Fix gr in compilation buffers (for evil users) 2021-06-06 01:19:49 -04:00
Henrik Lissner
ea80826fd2 gt/gT = add goto Nth tab behavior
As it does in vim.
2021-06-05 14:24:17 -04:00
Henrik Lissner
d32698b326 editor/evil: remove redundant put & add comment
evil-define-key* now declares its own indentation, so I don't have to.
2021-05-29 12:48:44 -04:00
Henrik Lissner
d1bed29680 Half-revert 69ea5c202
Fix cursor color stickiness when toggling emacs state.
2021-05-29 12:45:17 -04:00
Henrik Lissner
69ea5c2020 editor/evil: simplify cursor color change logic
Fixes race conditions where the cached cursor's color doesn't match the
loaded theme's.
2021-05-28 14:06:16 -04:00
Henrik Lissner
3ba364ae10 Minor refactoring across the board 2021-05-23 22:09:07 -04:00
Henrik Lissner
b029fdfc9c evil-respect-visual-line-mode = nil
Reverts f0eb015

The conflicts are not resolved. This also breaks propagated edits on
visual line + I/A. A more convoluted fix is needed.

Relevant to #2447
2021-05-10 03:12:31 -04:00
Henrik Lissner
437c33a8b2 Fix #4949: evil-want-visual-char-semi-exclusive = nil
This setting is _old_. Why it was set has been long forgotten, so I will
revert it to its default value of nil (which also fixes #4949).
2021-04-29 18:18:17 -04:00
Henrik Lissner
065d06edbb Bump :editor evil
emacs-evil/evil@d998a81 -> emacs-evil/evil@1b3db63
cute-jumper/evil-embrace.el@4379ade -> cute-jumper/evil-embrace.el@464e8ec

cute-jumper/evil-embrace.el#7 was merged, so our hack is no longer
needed.
2021-04-18 22:25:45 -04:00
Henrik Lissner
1ebfa35b71 editor/evil: fix csw, csW, css, & csp text objects
Until cute-jumper/evil-embrace.el#7 is merged.
2021-04-18 01:21:41 -04:00
Henrik Lissner
ce65645fb8 Minor refactors & comment revision 2021-03-27 18:27:19 -04:00
Henrik Lissner
f0eb0151f6 evil-respect-visual-line-mode = t
Reverts c733a6a

The previously reported issues seem to be resolved? Just have to wait
and see...

Closes #2447
2021-03-06 14:00:48 -05:00
Henrik Lissner
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
Henrik Lissner
0917187f20 editor/evil: bind C-w {S,V} to split-and-follow 2021-03-06 09:59:50 -05:00
Henrik Lissner
f1d89bf9c2 Bind gI and gA to new +lookup commands
Since these aren't used otherwise.
2021-02-26 21:33:00 -05:00
Henrik Lissner
c049480cbd Fix evil-join filling non-comments poorly 2021-02-25 13:59:43 -05:00
Henrik Lissner
16a495c97d Fix #4548: global TAB overwritten by evil keybind 2021-02-06 06:54:18 -05:00
Dan LaManna
08354f3316 Fix various broken links 2021-01-17 15:08:21 -05:00
Henrik Lissner
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
Henrik Lissner
9490d42cd3
Comment revision 2020-12-14 15:48:29 -05:00
Henrik Lissner
96d7e50f3e
Distinguish <C-i> from "C-i" 2020-12-11 15:50:02 -05:00
Henrik Lissner
d88e0795b6
Allow eldoc after doom/escape or evil state change 2020-12-02 17:58:10 -05:00