From c0c84eb99b3b536057428c0ee68f25a5a2da8b07 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 25 Dec 2018 03:56:24 -0500 Subject: [PATCH] Fix M-SPC error with helm #1059 The global leader keybind was conflicting with a global M-SPC keybind in helm-map. This keybind should only be set in non-evil sessions, so we unset it if evil is found. --- core/core-keybinds.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/core/core-keybinds.el b/core/core-keybinds.el index 317535eeb..cc0de6122 100644 --- a/core/core-keybinds.el +++ b/core/core-keybinds.el @@ -58,8 +58,10 @@ If any hook returns non-nil, all hooks after it are ignored.") (define-key doom-leader-map [override-state] 'all) (global-set-key (kbd doom-leader-alt-key) 'doom-leader) -(general-define-key :states '(emacs insert) doom-leader-alt-key 'doom-leader) -(general-define-key :states '(normal visual motion replace) doom-leader-key 'doom-leader) +(after! evil + (global-set-key (kbd doom-leader-alt-key) nil) + (general-define-key :states '(emacs insert) doom-leader-alt-key 'doom-leader) + (general-define-key :states '(normal visual motion replace) doom-leader-key 'doom-leader)) ;; We avoid `general-create-definer' to ensure that :states, :wk-full-keys and ;; :keymaps cannot be overwritten.