Commit graph

36 commits

Author SHA1 Message Date
688d69df58 dev: merge branch 'master' of github.com:doomemacs 2024-09-15 11:39:49 -04:00
Henrik Lissner
14189be77c
fix: out-of-bounds error if this-single-command-raw-keys is empty
It seems there's an edge case in EXWM where input events may occur
without keys to cause them (#8064), so these two keybind fixes need to
be ready to receive an empty vector from `this-single-command-raw-keys`.

Fix: #8064
2024-09-13 23:07:13 -04:00
30782f0cb3 dev: merging from master: 2024-09-07 22:24:35 -04:00
Henrik Lissner
de1ffbca11
feat: distinguish [C-m] key from RET
Now, uses can rebind ctrl+m by targeting [C-m] (or "<C-m>", same thing),
and it won't rebind RET. This will only work in GUI Emacs, however, and
there is no kkp support for this one.

Ref: 96d7e50f3e
2024-09-07 14:50:32 -04:00
cf4462683f dev: merge branch 'master' 2024-08-31 10:36:01 -04:00
Henrik Lissner
538ddf5e66
fix: C-i in KKP supported terminals
"C-i" and "TAB" are equivalent to Emacs. In GUI Emacs, we can bind to
[tab] instead of "TAB", permitted users to treat the two keys
differently. However, [tab] is unavailable in TTY frames, so there was
no avoiding sacrificing C-i keybinds there. With KKP support, though,
that's no longer the case.
2024-08-30 22:08:16 -04:00
5147ec7d73 dev: merge branch 'master' into emenel 2024-06-24 17:27:06 -04:00
Henrik Lissner
b405225b90
refactor!(vc-gutter): drop git-gutter for diff-hl
BREAKING CHANGE: This removes git-gutter as an implementation for the
`:ui vc-gutter` module, leaving only the diff-hl implementation. There
are no longer any +git-gutter or +diff-hl flags for this module. Users
don't have to do anything to keep the vc gutter, unless they prefer
git-gutter for any reason (in which case they'll need to install and set
it up themselves).

This has been planned for some time, because of a roadmap goal for Doom
to lean into native/built-in functionality where it's equal or better
than the third party alternatives. diff-hl relies on the built-in vc.el
library instead of talking to git directly (thus expanding support to
whatever VCS's vc.el supports, and not git alone), which also means it
can take advantage of its caching and other user configuration for
vc.el. Overall, it is faster and lighter.

What I've also been waiting for was a stage-hunk command, similar to
git-gutter:stage-hunk, which arrived in dgutov/diff-hl@a0560551cd and
dgutov/diff-hl@133538973b, and have evolved since.

Ref: dgutov/diff-hl@a0560551cd
Ref: dgutov/diff-hl@133538973b
Ref: https://github.com/orgs/doomemacs/projects/5/views/1?pane=issue&itemId=58747789
2024-06-22 18:14:04 -04:00
3daf85b919 dev: merging from main and pr7339 2024-03-29 10:46:41 -04:00
f94083403d dev: merging from main 2024-03-29 10:45:55 -04:00
d02c7a8b4c dev: merge branch 'master' into emenel 2024-03-25 09:20:09 -04:00
Jonas Jelten
bbadabda51 feat: allow setting evil states for leader keys
This allows adjusting the evil-states a leader key is active for.
2024-03-22 10:24:21 -04:00
87daad531e dev: merge branch 'pr7002' into emenel 2024-03-13 10:57:38 -04:00
16148ead05 dev: updating from latest 2024-03-11 13:08:02 -04:00
Henrik Lissner
c6063de439
nit: revise and reformat comments 2024-03-11 00:53:44 -04:00
StrawberryTea
023c2ec72c fix: use window-buffer instead of current-buffer
This is because immediately after switching persps or using similar
commands, the current-buffer is not the buffer that is displayed in the
window.
2024-02-20 15:32:32 -06:00
7cef14960a dev: updating from latest pr7002 2024-02-06 14:05:25 -05:00
Henrik Lissner
659f7bfc71
refactor!: deprecate IS-* OS constants
BREAKING CHANGE: This deprecates the IS-(MAC|WINDOWS|LINUX|BSD) family
of global constants in favor of a native `featurep` check:

  IS-MAC      ->  (featurep :system 'macos)
  IS-WINDOWS  ->  (featurep :system 'windows)
  IS-LINUX    ->  (featurep :system 'linux)
  IS-BSD      ->  (featurep :system 'bsd)

The constants will stick around until the v3 release so folks can still
use it -- and there are still some modules that use it, but I'll phase
those uses out gradually.

Fix: #7479
2024-02-04 17:54:29 -05:00
4cf23e4327 dev: adding lemonbreezes keybinds pr to personal 2023-11-24 15:10:03 -05:00
StrawberryTea
167911ba7b fix: use a post-command-hook for updating localleader 2023-10-18 15:32:10 -05:00
StrawberryTea
6624c39682 fix: set doom/leader for backwards compatibility 2023-10-18 15:31:53 -05:00
LemonBreezes
8429b60d99 fix: use doom-unreal-buffer-p for doom-init-localleader-key-h 2023-09-23 22:43:27 -05:00
Henrik Lissner
f26b038ec3
fix: prevent quit in the middle of doom/escape 2023-09-12 21:30:56 +02:00
LemonBreezes
f0bf0d670b fix: exclude fundamental-mode from localleader maps 2023-08-30 21:06:22 -05:00
StrawberryTea
afaf2936e1 fix: make localleader map relocatable
With this commit, now you can define any key to `doom-locallleader-map`
symbol and it will work as expected. The `which-key` descriptions will
work as expected too. The only caveat is that the localleader map is now
updated using hooks so there the potential for bugs where the incorrect
map is selected.
2023-08-26 19:17:39 -04:00
StrawberryTea
93680af5c7 fix: make leader key descriptions in the keymap
This commit moves leader key descriptions from
`which-key-replacement-alist` to the keymap itself. This helps with
performance because that way, which-key does not have to calculate every
single leader key description for each keypress. Furthermore, this fixes
issues like #1413 where relocating leader keymaps resulted in which-key
not showing the correct leader key descriptions.

I also made the leader prefix maps have their own prefix commands by
populating the function slot of the keymap variables. This is an Emacs
convention. I made `doom-leader-map` follow this convention as well.
2023-08-26 19:16:54 -04:00
Amos Bird
0bc06fc0d3 fix: correct name of doom-after-modules-init-hook
The old name is doom-after-init-modules-hook.
2023-02-18 00:51:54 -05:00
Henrik Lissner
594d70292d
refactor: remove use-package from doom-keybinds.el
One step toward a use-package-less future.

Ref: dda848e089
2022-09-24 22:10:02 +02:00
Henrik Lissner
1c4217aa27
refactor: minor refactors & commentary revision
* lisp/doom-cli.el:
  - reference backport source commit.
  - doom-cli--restart: a type check is all we need here. This is a
    programmer error, not a user error.
* lisp/doom-editor.el (recentf): mention recentf-show-abbreviated (added in
  emacs-mirror/emacs@32906819ad)
* lisp/doom-keybinds.el (doom-init-leader-keys-h): move to
  doom-after-init-hook, in case the user customizes leader variables in
  a previous hook (like emacs-startup-hook or after-init-hook).
* lisp/doom-start.el: use eval-when! to compile out the section on
  non-macOS systems (when Doom gets around to compiling its core files,
  later).
* modules/config/literate/autoload.el (+literate-config-file): use
  file-name-concat instead of string concat. This relaxes the
  requirement that doom-user-dir end in a /; a requirement I intend to
  fully phase out.
* modules/lang/emacs-lisp/autoload.el (+emacs-lisp-non-package): remove
  empty map! macro in flycheck-emacs-lisp-check-form. The macro already
  no-ops at compile-time/in noninteractive sessions since b480ed51a3.
* modules/ui/hl-todo/config.el (hl-todo-keyword-faces): revise
  commentary for default hl-todo keywords.

Ref: emacs-mirror/emacs@32906819ad
Ref: b480ed51a3
2022-09-24 20:31:34 +02: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
6ddaed5cdd
nit: comment revision and formatting
For clarity, to enforce conventions, and explain the unexplained.
2022-09-16 01:14:22 +02:00
Henrik Lissner
07d22adb4a
nit: revise comments, reformat config sections 2022-09-16 01:14:21 +02:00
Henrik Lissner
b480ed51a3
refactor(lib): suppress map! at compile/batch time
It's not useful in those scenarios, and is more likely to throw up
unrecoverably keybind conflict errors, when load order is determined by
an over-eager byte-compiler, rather than Doom's standard startup
process.
2022-09-16 01:14:21 +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
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
Henrik Lissner
b9933e6637
refactor!: restructure Doom core
BREAKING CHANGE: This restructures the project in preparation for Doom
to be split into two repos. Users that have reconfigured Doom's CLI
stand a good chance of seeing breakage, especially if they've referred
to any core-* feature, e.g.

  (after! core-cli-ci ...)

To fix it, simply s/core-/doom-/, i.e.

  (after! doom-cli-ci ...)

What this commit specifically changes is:
- Renames all core features from core-* to doom-*
- Moves core/core-* -> lisp/doom-*
- Moves core/autoloads/* -> lisp/lib/*
- Moves core/templates -> templates/

Ref: #4273
2022-07-30 22:41:13 +02:00
Renamed from core/core-keybinds.el (Browse further)