From 91ff3afcd66e742bfcfe14f531c8500983ced13a Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 18 Jul 2017 22:15:33 +0200 Subject: [PATCH] Autoload defhydra, remove unnecessary requires --- modules/feature/hydra/config.el | 79 +++++++++++++------------ modules/feature/version-control/+git.el | 1 - 2 files changed, 40 insertions(+), 40 deletions(-) diff --git a/modules/feature/hydra/config.el b/modules/feature/hydra/config.el index 51dc55260..03fb4d08e 100644 --- a/modules/feature/hydra/config.el +++ b/modules/feature/hydra/config.el @@ -1,7 +1,7 @@ ;;; feature/hydra/config.el -*- lexical-binding: t; -*- (def-package! hydra - :commands (+hydra-zoom/body +hydra-window/body) + :commands (+hydra-zoom/body +hydra-window/body defhydra) :config (defhydra +hydra-zoom (:hint t :color red) "zoom" @@ -47,48 +47,49 @@ ("q" nil))) -(when (featurep! :completion ivy) - (def-package! ivy-hydra - :config - (define-key ivy-mode-map (kbd "C-o") - (defhydra coo-ivy (:hint nil :color pink) - " +(def-package! ivy-hydra + :when (featurep! :completion ivy) + :after hydra + :config + (define-key ivy-mode-map (kbd "C-o") + (defhydra coo-ivy (:hint nil :color pink) + " Move ^^^^^^^^^^ | Call ^^^^ | Cancel^^ | Options^^ | Action _w_/_s_/_a_: %s(ivy-action-name) ----------^^^^^^^^^^-+--------------^^^^-+-------^^-+--------^^-+--------------------------------- _g_ ^ ^ _k_ ^ ^ _u_ | _f_orward _o_ccur | _i_nsert | _c_alling: %-7s(if ivy-calling \"on\" \"off\") _C_ase-fold: %-10`ivy-case-fold-search ^↨^ _h_ ^+^ _l_ ^↕^ | _RET_ done ^^ | _q_uit | _m_atcher: %-7s(ivy--matcher-desc) _t_runcate: %-11`truncate-lines _G_ ^ ^ _j_ ^ ^ _d_ | _TAB_ alt-done ^^ | ^ ^ | _<_/_>_: shrink/grow " - ;; arrows - ("j" ivy-next-line) - ("k" ivy-previous-line) - ("l" ivy-alt-done) - ("h" ivy-backward-delete-char) - ("g" ivy-beginning-of-buffer) - ("G" ivy-end-of-buffer) - ("d" ivy-scroll-up-command) - ("u" ivy-scroll-down-command) - ("e" ivy-scroll-down-command) - ;; actions - ("q" keyboard-escape-quit :exit t) - ("C-g" keyboard-escape-quit :exit t) - ("" keyboard-escape-quit :exit t) - ("C-o" nil) - ("i" nil) - ("TAB" ivy-alt-done :exit nil) - ("C-j" ivy-alt-done :exit nil) - ;; ("d" ivy-done :exit t) - ("RET" ivy-done :exit t) - ("C-m" ivy-done :exit t) - ("f" ivy-call) - ("c" ivy-toggle-calling) - ("m" ivy-toggle-fuzzy) - (">" ivy-minibuffer-grow) - ("<" ivy-minibuffer-shrink) - ("w" ivy-prev-action) - ("s" ivy-next-action) - ("a" ivy-read-action) - ("t" (setq truncate-lines (not truncate-lines))) - ("C" ivy-toggle-case-fold) + ;; arrows + ("j" ivy-next-line) + ("k" ivy-previous-line) + ("l" ivy-alt-done) + ("h" ivy-backward-delete-char) + ("g" ivy-beginning-of-buffer) + ("G" ivy-end-of-buffer) + ("d" ivy-scroll-up-command) + ("u" ivy-scroll-down-command) + ("e" ivy-scroll-down-command) + ;; actions + ("q" keyboard-escape-quit :exit t) + ("C-g" keyboard-escape-quit :exit t) + ("" keyboard-escape-quit :exit t) + ("C-o" nil) + ("i" nil) + ("TAB" ivy-alt-done :exit nil) + ("C-j" ivy-alt-done :exit nil) + ;; ("d" ivy-done :exit t) + ("RET" ivy-done :exit t) + ("C-m" ivy-done :exit t) + ("f" ivy-call) + ("c" ivy-toggle-calling) + ("m" ivy-toggle-fuzzy) + (">" ivy-minibuffer-grow) + ("<" ivy-minibuffer-shrink) + ("w" ivy-prev-action) + ("s" ivy-next-action) + ("a" ivy-read-action) + ("t" (setq truncate-lines (not truncate-lines))) + ("C" ivy-toggle-case-fold) - ("o" ivy-occur :exit t))))) + ("o" ivy-occur :exit t)))) diff --git a/modules/feature/version-control/+git.el b/modules/feature/version-control/+git.el index e0e9ebc68..408b68667 100644 --- a/modules/feature/version-control/+git.el +++ b/modules/feature/version-control/+git.el @@ -35,7 +35,6 @@ (when (featurep! :feature hydra) - (require 'hydra) (defhydra +hydra-git-gutter (:body-pre (git-gutter-mode 1) :hint nil) "