Skip to content

Commit 4e466d7

Browse files
kovanclaude
andcommitted
fix(keybinds): remove :major-modes from localleader definitions
`define-localleader-key!` unconditionally set `:major-modes t`, which makes general.el infer mode names from keymap names and use `which-key-add-major-mode-key-based-replacements`. This only works for major mode keymaps — minor mode keymaps (like `cider-mode-map`) get their which-key descriptions silently dropped. Without `:major-modes`, general.el uses `which-key-add-keymap-based-replacements` instead, which works for all keymaps. The `:keymaps` property (always provided by `map!`) already scopes bindings to the correct keymap. Fix #8539 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent a0d6aac commit 4e466d7

1 file changed

Lines changed: 0 additions & 2 deletions

File tree

lisp/doom-keybinds.el

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,12 +199,10 @@ localleader prefix."
199199
;; emacs state)
200200
`(general-define-key
201201
:states '(normal visual motion emacs insert)
202-
:major-modes t
203202
:prefix doom-localleader-key
204203
:non-normal-prefix doom-localleader-alt-key
205204
,@args)
206205
`(general-define-key
207-
:major-modes t
208206
:prefix doom-localleader-alt-key
209207
,@args)))
210208

0 commit comments

Comments
 (0)