From 183ccbb8f17fad3225046ed06e738d3117a9c885 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 31 May 2018 11:41:33 +0200 Subject: [PATCH] Merge evil-collection-ivy into completion/ivy Disables evil-collection-ivy. Another step toward the removal of evil-collection from Doom. --- modules/completion/ivy/config.el | 66 +++++++++++++++++++++++++++++ modules/config/default/+bindings.el | 19 ++------- modules/feature/evil/config.el | 1 + 3 files changed, 71 insertions(+), 15 deletions(-) diff --git a/modules/completion/ivy/config.el b/modules/completion/ivy/config.el index 87ff505af..d6f8728e2 100644 --- a/modules/completion/ivy/config.el +++ b/modules/completion/ivy/config.el @@ -223,3 +223,69 @@ immediately runs it on the current candidate (ending the ivy session)." (counsel-grep-or-swiper . ivy--regex-plus) (t . ivy--regex-fuzzy)) ivy-initial-inputs-alist nil)) + + +;; +;; Evil key fixes +;; + +(map! :when (featurep! :feature evil +everywhere) + :after ivy + :map ivy-occur-mode-map + :n [mouse-1] #'ivy-occur-click + :n "" #'ivy-occur-press-and-switch + :m "j" #'ivy-occur-next-line + :m "k" #'ivy-occur-previous-line + :m "h" #'evil-backward-char + :m "l" #'evil-forward-char + :m "g" nil + :m "gg" #'evil-goto-first-line + :n "gf" #'ivy-occur-press + :n "ga" #'ivy-occur-read-action + :n "go" #'ivy-occur-dispatch + :n "gc" #'ivy-occur-toggle-calling + :n "gr" #'ivy-occur-revert-buffer + :n "q" #'quit-window + + :map ivy-occur-grep-mode-map + :v "j" #'evil-next-line + :v "k" #'evil-previous-line + :n "D" #'ivy-occur-delete-candidate + :n "C-d" #'evil-scroll-down + :n "d" #'ivy-occur-delete-candidate + :n "C-x C-q" #'ivy-wgrep-change-to-wgrep-mode + :n "i" #'ivy-wgrep-change-to-wgrep-mode + :n "gd" #'ivy-occur-delete-candidate + :n [mouse-1] #'ivy-occur-click + :n "" #'ivy-occur-press-and-switch + :m "j" #'ivy-occur-next-line + :m "k" #'ivy-occur-previous-line + :m "h" #'evil-backward-char + :m "l" #'evil-forward-char + :m "g" nil + :m "gg" #'evil-goto-first-line + :n "gf" #'ivy-occur-press + :n "gr" #'ivy-occur-revert-buffer + :n "ga" #'ivy-occur-read-action + :n "go" #'ivy-occur-dispatch + :n "gc" #'ivy-occur-toggle-calling + ;; quit + :n "q" #'quit-window + + :map ivy-minibuffer-map + [escape] #'abort-recursive-edit + [return] #'exit-minibuffer + [backspace] #'ivy-backward-delete-char + "C-m" #'ivy-done + "C-j" #'ivy-next-line + "C-k" #'ivy-previous-line + "C-l" #'ivy-alt-done + "C-A-k" #'ivy-scroll-down-command + "C-A-j" #'ivy-scroll-up-command + "C-r" #'ivy-reverse-i-search + "C-n" #'ivy-next-line + "C-p" #'ivy-previous-line + "C-w" #'ivy-backward-kill-word + "C-u" #'ivy-kill-line + "C-b" #'backward-word + "C-f" #'forward-word) diff --git a/modules/config/default/+bindings.el b/modules/config/default/+bindings.el index 158399161..6c814b195 100644 --- a/modules/config/default/+bindings.el +++ b/modules/config/default/+bindings.el @@ -608,21 +608,10 @@ ;; ivy (:after ivy :map ivy-minibuffer-map - [escape] #'keyboard-escape-quit - "C-SPC" #'ivy-call-and-recenter - "M-z" #'undo - "M-v" #'yank - "C-v" #'yank - "C-r" #'evil-paste-from-register - "C-k" #'ivy-previous-line - "C-j" #'ivy-next-line - "C-A-k" #'ivy-scroll-down-command - "C-A-j" #'ivy-scroll-up-command - "C-l" #'ivy-alt-done - "C-w" #'ivy-backward-kill-word - "C-u" #'ivy-kill-line - "C-b" #'backward-word - "C-f" #'forward-word) + "C-SPC" #'ivy-call-and-recenter ; preview file + "M-z" #'undo + "M-v" #'yank + "C-v" #'yank) ;; neotree (:after neotree diff --git a/modules/feature/evil/config.el b/modules/feature/evil/config.el index 7a733716c..044b0db3e 100644 --- a/modules/feature/evil/config.el +++ b/modules/feature/evil/config.el @@ -6,6 +6,7 @@ (defvar +evil-collection-disabled-list '(kotlin-mode ; doesn't do anything useful simple + ivy anaconda-mode) ; we'll do it ourselves "A list of `evil-collection' modules to disable. See the definition of this variable for an explanation of the defaults (in comments). See