Commit Graph

48 Commits

Author SHA1 Message Date
4c9df9bfc6 fix: partially revert OS detection changes
These changes snuck into ad6a3d0, but have not been implemented yet, so
some OS-specific functionality was orphaned.

Amend: ad6a3d0f33
2022-08-18 17:08:16 +02:00
aa54383b5d refactor: deprecate doom-etc-dir for doom-data-dir
doom-etc-dir will be renamed to doom-data-dir, to better reflect its
purpose, and align it with XDG_DATA_HOME (where it will be moved to in
v3, where Doom will begin to obey XDG directory conventions more
closely).
2022-08-14 20:43:35 +02:00
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
a505eae88f fix(multiple-cursors): keybinds for {next,last}-cursor 2022-03-19 16:12:30 +01:00
4b75100aea fix(multiple-cursors): "No search pattern" error from evil-mc
Our hacks were too eagerly clearning evil-mc's state. These changes will
ensure that doesn't happen.

Perhaps its time I package this up into a PR upstream?

Fix: #6091
2022-02-10 21:07:20 +01:00
b2b19e7196 fix(multiple-cursors): contextually activate minor mode
evil-mc's design is bizarre. Its variables and hooks are lazy loaded
rather than declared at top-level, some hooks aren't defined or
documented, it's a bit initializer-function drunk, and its minor modes
are intended to be perpetually active -- even when no cursors are active
(causing #6021). I undo all of that here.

Fix: #6021
2022-01-27 03:43:51 +01:00
86034131c4 bump: :editor evil
Dewdrops/evil-exchange@ac50f21b29 -> Dewdrops/evil-exchange@5f0a2d4143
emacs-evil/evil-collection@1b9d5c5d93 -> emacs-evil/evil-collection@0ce1ea96b4
emacs-evil/evil@b00018bf55 -> emacs-evil/evil@a5fd96dadc
redguardtoo/evil-nerd-commenter@63baf2d1c7 -> redguardtoo/evil-nerd-commenter@42ba1a473b

Close: #5983
2022-01-12 01:55:34 +01:00
407cf56a04 fix(multiple-cursors): references to removed keymaps
Fix: #5802
Ref: hlissner/evil-multiedit@36904ce86e
2021-11-21 03:46:45 +01:00
a5ce61aa55 fix(multiple-cursors): keybind conflict with embark
Fixes #5374.
2021-09-14 19:06:04 +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
65561df25f Improve multiple-cursors compatibility with evil-multiedit
After exiting `multiple-cursors`, when the previous state is
multiedit{,-insert}, return to normal state.

Use case:
- Mark occurrences with evil-multiedit
- `iedit-switch-to-mc-mode` ("M-M")
- Make some edit
- "C-g" to exit `multiple-cursors`

Expected behaviour: Return to evil's normal-state
Observed behaviour before the patch: Emacs stays on emacs-state
2021-07-22 11:38:41 +07:00
2339481208 Fix broken, whitelisted evil-mc commands
Because they weren't being set correctly due to a faulty condition
misreading nil.
2021-02-14 21:14:07 -05:00
7679c08d57 Fix #4614 (truly): visual goto-bol w/ evil-mc 2021-02-14 13:53:48 -05:00
8635fc78bc Bump :editor
DogLooksGood/parinfer-mode@91856b9 -> DogLooksGood/parinfer-mode@8659c99
abo-abo/lispy@5c8a59a -> abo-abo/lispy@38a7df4
emacs-evil/evil-collection@e6824e2 -> emacs-evil/evil-collection@334670e
emacsorphanage/god-mode@f51c8f6 -> emacsorphanage/god-mode@02a402b
gabesoft/evil-mc@7dfb2ca -> gabesoft/evil-mc@f04fb17
hlissner/doom-snippets@33eb93b -> hlissner/doom-snippets@aa5587b
magnars/multiple-cursors.el@83abb05 -> magnars/multiple-cursors.el@a9d7764
noctuid/lispyville@0f13f26 -> noctuid/lispyville@89316f0
redguardtoo/evil-nerd-commenter@563cdc1 -> redguardtoo/evil-nerd-commenter@2730820
2021-02-11 22:05:21 -05:00
36a63d1613 Fix #4614: evil-mc not propagating visual-beg-of-line
...to all cursors, because it wasn't whitelisted.
2021-02-11 22:03:44 -05:00
042fd4d929 Fix obsolete case alias compiler warnings 2021-01-10 04:56:40 -05:00
d105a0400c Add ess-smart-comma support to evil-mc 2020-10-14 01:29:46 -04:00
a9d36ddcaf editor/multiple-cursors: minor refactor
Remove some redundant entries in evil-mc-custom-known-commands.
2020-08-02 19:21:38 -04:00
c3be74139a Add eval-and-replace support to evil-mc
And refactor evil-mc-custom-known-commands init
2020-08-02 18:11:45 -04:00
61cb7252e2 Fix #3509 again 2020-07-24 02:13:19 -04:00
8609e22f73 Fix #3509: add swiper-mc to mc/cmds-to-run-once 2020-07-23 00:57:00 -04:00
63a94698a2 Fix #3509: add swiper-mc to mc/cmds-to-run-once 2020-07-18 16:59:54 -04:00
956a90598e Add lispy to evil-mc-incompalible-minor-modes 2020-06-07 01:57:36 +03:00
8e4ecdf668 Allow repeating evil-mc commands w/ numerical arg
Until gabesoft/evil-mc#110 is resolved.
2020-04-11 20:09:02 -04:00
c1879945fd Replace doom/backward-kill-to-bol-and-indent
WIth new evil-delete-back-to-indentation, with behaves exactly as C-u
does in vim.
2019-12-21 03:30:44 -05:00
d8ecb1396b editor/multiple-cursors: fix :mc ex command
Due to missing variables
2019-12-20 00:59:52 -05:00
2c79ab354a Add evil-numbers inc commands to evil-mc-custom-known-commands 2019-12-03 20:42:57 -05:00
a122dfd6a0 editor/multiple-cursors: extend evil-org support 2019-10-27 14:03:45 -04:00
5f9778edd6 editor/multiple-cursors: fix unbound evil-mc keybinds 2019-10-27 14:03:45 -04:00
3c6f48f9ec Move evil & corrective keybinds to respective modules
Keybinds that correct behavior or provide or extend vim functionality
were moved to their respective modules, or to the :editor evil module.

Keybinds in the global space, that are particularly opinionated but
potentially harmful or imposing as a default, or likely for users to
change (like leader keys), are kept in config/default.
2019-10-26 23:44:28 -04:00
945eb7e064 editor/multiple-cursors: minor refactor 2019-10-26 02:12:59 -04:00
890b96d874 Add: evil bindings for 2 evil-mc functions
evil-mc-make-cursor-in-visual-selection-beg
evil-mc-make-cursor-in-visual-selection-end
2019-10-15 13:56:16 +02:00
1c05773c39 General, minor refactors & comment revision 2019-09-11 23:41:08 -04:00
a3e262c7ac 💥 Refactor add-hook! macro & change arg order
This update may potentially break your usage of add-hook! if you pass
the :local or :append properties to it. This is how they used to work:

  (add-hook! :append 'some-mode-hook #'do-something)

Thsoe properties must now follow the hooks, e.g.

  (add-hook! 'some-mode-hook :append #'do-something)

Other changes:
- Various add-hook calls have been renamed to add-hook! because I
  incorrectly assumed `defun` always returned its definition's symbol,
  when in fact, its return value is "undefined" (so sayeth the
  documentation). This should fix #1597.
- This update adds the ability to add multiple functions to hooks
  without a list:

    (add-hook! 'some-mode-hook
               #'do-something
               #'do-something-else)

- The indentation logic has been changed so that consecutive function
  symbols at indented at the same level as the first argument, but forms
  are indent like a defun.

    (add-hook! 'some-mode-hook
               #'do-something
               #'do-something-else)

    (add-hook! 'some-mode-hook
      (message "Hello"))
2019-07-26 20:17:29 +02:00
82ae3a73f3 def-advice!->defadvice! & conform to new advice conventions
This commit does two things:

- Renames def-advice! to defadvice!, in the spirit of naming convenience
  macros after the function/macro they enhance or replace.
- Correct the names of advice functions to indicate visibility and
  intent. A public advice function like doom-set-jump-a is meant to be
  used elsewhere. A private one like +dired--cleanup-header-line-a
  shouldn't -- it likely won't work anywhere but the function(s) it was
  made to advise.
2019-07-23 17:24:56 +02:00
76cacb5bfe 💥 Rename def-package! -> use-package!
Calling this pivotal macro "def-package!" has frequently been a source
of confusion. It is a thin wrapper around use-package, and it should be
obvious that it is so. For this reason, and to match the naming
convention used with other convenience macros/wrappers, it is now
use-package!.

Also changes def-package-hook! -> use-package-hook!

The old macros are now marked obsolete and will be removed when straight
integration is merged.
2019-07-23 12:50:45 +02:00
88813ff196 Minor reformatting across the board
Gotta

Look

Nice
2019-07-22 22:34:08 +02:00
149b2617b0 💥 revise hook/var fns naming convention (2/2)
This is second of three big naming convention changes. In this commit,
we change the naming conventions for hook functions and variable
functions:

1. Replace the bar | to indicate a hook function with a -h suffix, e.g.

     doom|init-ui -> doom-init-ui-h
     doom|run-local-var-hooks -> doom-run-local-var-hooks-h

2. And add a -fn suffix for functions meant to be set on variables,
   e.g.

     (setq magit-display-buffer-function #'+magit-display-buffer-fn)

See ccf327f8 for the reasoning behind these changes.
2019-07-22 02:30:38 +02:00
51d3b1b424 💥 revise advice naming convention (1/2)
This is first of three big naming convention updates that have been a
long time coming. With 2.1 on the horizon, all the breaking updates will
batched together in preparation for the long haul.

In this commit, we do away with the asterix to communicate that a
function is an advice function, and we replace it with the '-a' suffix.
e.g.

  doom*shut-up -> doom-shut-up-a
  doom*recenter -> doom-recenter-a
  +evil*static-reindent -> +evil--static-reindent-a

The rationale behind this change is:

1. Elisp's own formatting/indenting tools would occasionally struggle
   with | and * (particularly pp and cl-prettyprint). They have no
   problem with / and :, fortunately.
2. External syntax highlighters (like pygmentize, discord markdown or
   github markdown) struggle with it, sometimes refusing to highlight
   code beyond these symbols.
3. * and | are less expressive than - and -- in communicating the
   intended visibility, versatility and stability of a function.
4. It complicated the regexps we must use to search for them.
5. They were arbitrary and over-complicated to begin with, decided
   on haphazardly way back when Doom was simply "my private config".

Anyhow, like how predicate functions have the -p suffix, we'll adopt the
-a suffix for advice functions, -h for hook functions and -fn for
variable functions.

Other noteable changes:
- Replaces advice-{add,remove}! macro with new def-advice!
  macro. The old pair weren't as useful. The new def-advice! saves on a
  lot of space.
- Removed "stage" assertions to make sure you were using the right
  macros in the right place. Turned out to not be necessary, we'll
  employ better checks later.
2019-07-22 02:27:45 +02:00
77e4cc4d58 💥 Remove :feature category
:feature was a "catch-all" category. Many of its modules fit better in
other categories, so they've been moved:

- feature/debugger -> tools/debugger
- feature/evil -> editor/evil
- feature/eval -> tools/eval
- feature/lookup -> tools/lookup
- feature/snippets -> editor/snippets
- feature/file-templates -> editor/file-templates
- feature/workspaces -> ui/workspaces

More potential changes in the future:

- A new :term category for terminal emulation modules (eshell, term and
  vterm).
- A new :os category for modules dedicated to os-specific functionality.
  The :tools macos module would fit here, but so would modules for nixos
  and arch.
- A new :services category for web-service integration, like wakatime,
  twitter, elfeed, gist and pastebin services.
2019-04-24 18:16:04 -04:00
b89f7e1127 Disable evil-mc bar cursor on Mac OS and Windows 2019-03-16 14:15:19 +08:00
99a5ff2025 Fix loading of multiple-cursors configuration
The package is split in a way that `multiple-cursors.el` is normally not
required when autoloading from commands; `multiple-cursors-core.el` is
always loaded.

Unfortunately the `mc/list-file` location is still not being set
properly, a fix has been submitted: magnars/multiple-cursors.el#355
2019-03-13 14:24:20 +10:00
6956525f79 I silenced the byte compiler, what happened next will blow your mind
Top 10 incredible ways to silence the byte compiler

The byte compiler just wouldn't shut up. You wouldn't believe what
happened next.

40 hot singles in your area are waiting for the byte compiler to shut
up.

20 INSANE life hacks to put an end to the byte compiler's tyranny.

(DEFINITELY NOT CLICKBAIT)
2019-02-18 01:05:26 -05:00
b085dd8180 Refactor out redundant hook 2019-01-28 19:55:36 -05:00
5baaf08246 Move evil-mc library to editor/multiple-cursors 2019-01-28 19:54:55 -05:00
9936532ea3 Move auth-sources & mc/list-files
...to move appropriate locations.
2018-12-23 23:16:03 -05:00
c2c7def192 editor/multiple-cursors: better command whitelist
+ Fixes explicit usage of evil-escape from evil-mc cursors (e.g. M-x
  evil-escape or C-g, not the escape sequences jk/fd)
+ Fixes delete-char (DEL key) from cursors
+ Fixes all custom commands when used with a COUNT
2018-09-23 10:26:41 -04:00
8d26879f99 Add :editor multiple-cursors module
Moves evil-mc/evil-multiedit out of feature/evil.
2018-08-06 00:31:23 +02:00