Use use-package to configure helm

This commit is contained in:
Tom Willemse 2016-05-09 23:44:46 +02:00
parent 8ae958f2f6
commit 4f2ae398cd

View file

@ -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)