From 4f2ae398cde7cb22382808d387631b35b3d3fe34 Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Mon, 9 May 2016 23:44:46 +0200 Subject: [PATCH] Use use-package to configure helm --- emacs/.emacs.d/init.el | 38 +++++++++++++++++++++----------------- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/emacs/.emacs.d/init.el b/emacs/.emacs.d/init.el index dafd79b..05a876f 100644 --- a/emacs/.emacs.d/init.el +++ b/emacs/.emacs.d/init.el @@ -29,6 +29,8 @@ (load (concat user-emacs-directory "init2")) +(require 'bind-key) + ;;;; Autoloads (autoload 'sawfish-mode "sawfish" nil t) @@ -300,10 +302,6 @@ MODE1 is enabled and vice-versa." (add-to-list 'grep-find-ignored-directories "log") (add-to-list 'grep-find-ignored-files "TAGS")) -(stante-after helm - (setq helm-split-window-in-side-p t - helm-buffer-details-flag nil)) - (stante-after help-at-pt (setq help-at-pt-display-when-idle t)) @@ -455,11 +453,6 @@ MODE1 is enabled and vice-versa." (add-to-list 'display-buffer-alist '("^\\*Help\\*$" oni:pop-to-buffer-in-side-window)) - (add-to-list - 'display-buffer-alist - `(,(rx bol "*helm") display-buffer-in-side-window - (side . right) - (slot . 1))) (add-to-list 'display-buffer-alist `(,(rx bol "*" (or "grunt" "compilation*")) @@ -474,6 +467,25 @@ MODE1 is enabled and vice-versa." (use-package apache-mode :ensure t :defer t) +(use-package helm + :ensure t + :bind (("M-x" . helm-M-x) + ("C-x b" . helm-buffers-list) + ("C-x r b" . helm-bookmarks) + ("C-x C-f" . helm-find-files)) + :init + (setq helm-mode-line-string nil) + :config + (setq helm-split-window-in-side-p t + helm-buffer-details-flag nil) + ;; Don't truncate lines in Helm buffers + (add-hook 'helm-after-initialize-hook 'oni:stop-truncating-helm-lines) + ;; Show helm buffers in a window on the right + (add-to-list 'display-buffer-alist + `(,(rx bol "*helm") display-buffer-in-side-window + (side . right) + (slot . 1)))) + (use-package js2-mode :ensure t :mode (("\\.js\\'" . js2-mode) @@ -496,9 +508,6 @@ MODE1 is enabled and vice-versa." (add-hook 'eshell-first-time-mode-hook 'oni-eshell-set-prompt) -;; Don't truncate lines in Helm buffers -(add-hook 'helm-after-initialize-hook 'oni:stop-truncating-helm-lines) - ;; Automatically make shell scripts executable after saving. (add-hook 'after-save-hook 'executable-make-buffer-file-executable-if-script-p :append) @@ -760,11 +769,6 @@ MODE1 is enabled and vice-versa." ;; (global-set-key (kbd "C-c f") #'hydra-vimish-fold/body) (global-set-key (kbd "C-c g") 'hydra-magit/body) -(global-set-key (kbd "M-x") 'helm-M-x) -(global-set-key (kbd "C-x b") 'helm-buffers-list) -(global-set-key (kbd "C-x r b") 'helm-bookmarks) -(global-set-key (kbd "C-x C-f") 'helm-find-files) - (setq org-completion-use-ido t) (setq magit-completing-read-function 'magit-ido-completing-read) (setq gnus-completing-read-function 'gnus-ido-completing-read)