From 19f1c70144ee1f9e14ecfaeabf729e6dc8c66be5 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 17 Jun 2018 16:43:10 +0200 Subject: [PATCH] Refactor company keybinds Also merge evil-collection-company into Doom. Two new features to note: C-S-s will invoke your completion engine for the remaining results. --- modules/config/default/+bindings.el | 12 ++++++++++-- modules/feature/evil/config.el | 1 + 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/modules/config/default/+bindings.el b/modules/config/default/+bindings.el index d0ac26715..06448938e 100644 --- a/modules/config/default/+bindings.el +++ b/modules/config/default/+bindings.el @@ -126,12 +126,18 @@ (:map company-active-map ;; Don't interfere with `evil-delete-backward-word' in insert mode "C-w" nil - "C-o" #'company-search-kill-others "C-n" #'company-select-next "C-p" #'company-select-previous + "C-j" #'company-select-next + "C-k" #'company-select-previous "C-h" #'company-show-doc-buffer + "C-u" #'company-previous-page + "C-d" #'company-next-page "C-s" #'company-filter-candidates - "C-S-s" #'company-search-candidates + (:when (featurep! :completion helm) + "C-S-s" #'helm-company) + (:when (featurep! :completion ivy) + "C-S-s" #'counsel-company) "C-SPC" #'company-complete-common [tab] #'company-complete-common-or-cycle [backtab] #'company-select-previous) @@ -139,6 +145,8 @@ (:map company-search-map "C-n" #'company-select-next-or-abort "C-p" #'company-select-previous-or-abort + "C-j" #'company-select-next-or-abort + "C-k" #'company-select-previous-or-abort "C-s" (λ! (company-search-abort) (company-filter-candidates)) [escape] #'company-search-abort)) diff --git a/modules/feature/evil/config.el b/modules/feature/evil/config.el index 509e58b9b..2cf3fa314 100644 --- a/modules/feature/evil/config.el +++ b/modules/feature/evil/config.el @@ -8,6 +8,7 @@ simple ;; we'll do these ourselves anaconda-mode + company dired helm ivy