From fb92599badf067109d7ea1b5cf5778bd306bd9bc Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 26 Mar 2016 01:20:25 -0400 Subject: [PATCH] Lazy load helm --- core/core-helm.el | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/core/core-helm.el b/core/core-helm.el index ab0d44e3f..c6d42070f 100644 --- a/core/core-helm.el +++ b/core/core-helm.el @@ -26,8 +26,7 @@ helm-projectile-find-dir))) (use-package helm - :defer t - :commands (helm helm-mode) + :defer 2 :init (defvar helm-global-prompt ":: ") (setq-default @@ -54,11 +53,6 @@ helm-bookmark-show-location t) :config - (require 'helm-files) - - (mapc (lambda (r) (add-to-list 'helm-boring-file-regexp-list r)) - (list "\\.projects$" "\\.DS_Store$" "\\.cask")) - (map! (:map (helm-map helm-generic-files-map helm-find-files-map helm-swoop-map helm-projectile-find-file-map) "ESC" nil "/" nil @@ -72,17 +66,14 @@ "" 'helm-execute-persistent-action) (:map (helm-generic-files-map helm-projectile-find-file-map) "ESC" 'helm-keyboard-quit) - (:map helm-find-files-map - "C-w" 'helm-find-files-up-one-level - "TAB" 'helm-execute-persistent-action) (:map helm-ag-map "" 'helm-ag-edit) (:map helm-ag-edit-map "" 'helm-ag--edit-abort :n "zx" 'helm-ag--edit-abort) (:map helm-map - "C-S-n" 'helm-next-source - "C-S-p" 'helm-previous-source + "C-S-n" 'helm-next-source + "C-S-p" 'helm-previous-source "C-u" 'helm-delete-minibuffer-contents)) ;;; Helm hacks @@ -113,8 +104,19 @@ ;; Hide mode-line in helm windows (advice-add 'helm-display-mode-line :override 'narf*helm-hide-header) + (require 'helm-mode) (helm-mode 1)) +(use-package helm-files + :commands (helm-browse-project helm-find helm-find-files helm-for-files helm-multi-files helm-recentf) + :config + (map! (:map helm-find-files-map + "C-w" 'helm-find-files-up-one-level + "TAB" 'helm-execute-persistent-action)) + + (mapc (lambda (r) (add-to-list 'helm-boring-file-regexp-list r)) + (list "\\.projects$" "\\.DS_Store$" "\\.cask"))) + (use-package helm-ag :commands (helm-ag helm-ag-mode