diff options
| author | Miquel Sabaté Solà <msabate@suse.com> | 2016-06-30 13:37:25 +0200 |
|---|---|---|
| committer | Miquel Sabaté Solà <msabate@suse.com> | 2016-06-30 13:37:25 +0200 |
| commit | 9c5426c381537b0cf4c57855ab4aae2cb9043f6f (patch) | |
| tree | 9bbada63e382eb2b48bc73c7f43f010e80c7931f /emacs | |
| parent | a5551d165f3ba1b96e7e932037f0a804efdc0cba (diff) | |
| download | dotfiles-9c5426c381537b0cf4c57855ab4aae2cb9043f6f.tar.gz dotfiles-9c5426c381537b0cf4c57855ab4aae2cb9043f6f.zip | |
emacs: show the Helm pattern on the header
This requires some magic that it's been provided in a Reddit thread :)
Signed-off-by: Miquel Sabaté Solà <msabate@suse.com>
Diffstat (limited to 'emacs')
| -rw-r--r-- | emacs/init.el | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/emacs/init.el b/emacs/init.el index 0167ce0..7400394 100644 --- a/emacs/init.el +++ b/emacs/init.el @@ -209,7 +209,24 @@ (use-package helm :ensure t :config - (setq projectile-completion-system 'helm)) + (setq projectile-completion-system 'helm) + + ; Allow the search pattern to be on the header. Taken from this Reddit thread: + ; https://www.reddit.com/r/emacs/comments/3asbyn/new_and_very_useful_helm_feature_enter_search/ + (setq helm-echo-input-in-header-line t) + + (defun helm-hide-minibuffer-maybe () + "Hide the minibuffer if we are in a Helm session" + + (when (with-helm-buffer helm-echo-input-in-header-line) + (let ((ov (make-overlay (point-min) (point-max) nil nil t))) + (overlay-put ov 'window (selected-window)) + (overlay-put ov 'face (let ((bg-color (face-background 'default nil))) + `(:background ,bg-color :foreground ,bg-color))) + (setq-local cursor-type nil)))) + + (add-hook 'helm-minibuffer-set-up-hook 'helm-hide-minibuffer-maybe) + (setq helm-split-window-in-side-p t)) (use-package helm-projectile :ensure t |
