helm: refactor config
This commit is contained in:
parent
62ba336a36
commit
030cde12aa
1 changed files with 35 additions and 23 deletions
|
@ -4,7 +4,7 @@
|
||||||
:defer 1
|
:defer 1
|
||||||
:commands (helm helm-other-buffer helm-mode)
|
:commands (helm helm-other-buffer helm-mode)
|
||||||
:init
|
:init
|
||||||
(defvar helm-global-prompt "›")
|
(defvar helm-global-prompt "››› ")
|
||||||
(setq-default
|
(setq-default
|
||||||
helm-quick-update t
|
helm-quick-update t
|
||||||
|
|
||||||
|
@ -23,28 +23,29 @@
|
||||||
|
|
||||||
;; Don't override evil-ex's completion
|
;; Don't override evil-ex's completion
|
||||||
helm-mode-handle-completion-in-region nil
|
helm-mode-handle-completion-in-region nil
|
||||||
helm-candidate-number-limit 40)
|
helm-candidate-number-limit 50)
|
||||||
|
|
||||||
:config
|
:config
|
||||||
(map! (:map (helm-map helm-generic-files-map helm-find-files-map helm-swoop-map helm-projectile-find-file-map)
|
(map! (:map (helm-map helm-projectile-find-file-map)
|
||||||
"ESC" nil
|
:e "ESC" nil
|
||||||
"/" nil
|
:e "/" nil
|
||||||
"M-v" 'clipboard-yank
|
:e "M-v" 'clipboard-yank
|
||||||
"C-w" 'backward-kill-word
|
:e "C-w" 'backward-kill-word
|
||||||
"C-r" 'evil-paste-from-register ; Evil registers in helm! Glorious!
|
:e "C-r" 'evil-paste-from-register ; Evil registers in helm! Glorious!
|
||||||
"C-b" 'backward-word
|
:e "C-b" 'backward-word
|
||||||
"<left>" 'backward-char
|
:e "<left>" 'backward-char
|
||||||
"<right>" 'forward-char
|
:e "<right>" 'forward-char
|
||||||
"<escape>" 'helm-keyboard-quit
|
:e "<escape>" 'helm-keyboard-quit
|
||||||
[escape] 'helm-keyboard-quit
|
:e [escape] 'helm-keyboard-quit
|
||||||
"<tab>" 'helm-execute-persistent-action)
|
:e "<tab>" 'helm-execute-persistent-action)
|
||||||
(:map (helm-generic-files-map helm-projectile-find-file-map)
|
(:map (helm-generic-files-map helm-projectile-find-file-map)
|
||||||
"ESC" 'helm-keyboard-quit)
|
:e "ESC" 'helm-keyboard-quit)
|
||||||
(:map helm-ag-map
|
(:map helm-ag-map
|
||||||
"<backtab>" 'helm-ag-edit)
|
:e "<backtab>" 'helm-ag-edit)
|
||||||
|
(:after helm-ag
|
||||||
(:map helm-ag-edit-map
|
(:map helm-ag-edit-map
|
||||||
"<escape>" 'helm-ag--edit-abort
|
"<escape>" 'helm-ag--edit-abort
|
||||||
:n "zx" 'helm-ag--edit-abort)
|
:n "zx" 'helm-ag--edit-abort))
|
||||||
(:map helm-map
|
(:map helm-map
|
||||||
"C-S-n" 'helm-next-source
|
"C-S-n" 'helm-next-source
|
||||||
"C-S-p" 'helm-previous-source
|
"C-S-p" 'helm-previous-source
|
||||||
|
@ -67,16 +68,13 @@
|
||||||
(setcar (nthcdr 2 plist) helm-global-prompt))
|
(setcar (nthcdr 2 plist) helm-global-prompt))
|
||||||
plist)
|
plist)
|
||||||
|
|
||||||
(defvar narf-helm-force-project-buffers nil)
|
|
||||||
(defun helm*buffer-list (&rest _) (narf/get-buffer-names narf-helm-force-project-buffers))
|
|
||||||
(advice-add 'helm-buffer-list :override 'helm*buffer-list)
|
|
||||||
|
|
||||||
;; Shrink source headers if there is only one source
|
;; Shrink source headers if there is only one source
|
||||||
(add-hook 'helm-after-initialize-hook 'narf*helm-hide-source-header-maybe)
|
(add-hook 'helm-after-initialize-hook 'narf*helm-hide-source-header-maybe)
|
||||||
;; A simpler prompt: see `helm-global-prompt'
|
;; A simpler prompt: see `helm-global-prompt'
|
||||||
(advice-add 'helm :filter-args 'narf*helm-replace-prompt)
|
(advice-add 'helm :filter-args 'narf*helm-replace-prompt)
|
||||||
;; Hide mode-line in helm windows
|
;; Hide mode-line in helm windows
|
||||||
(advice-add 'helm-display-mode-line :override 'narf*helm-hide-header)
|
(advice-add 'helm-display-mode-line :override 'narf*helm-hide-header)
|
||||||
|
;; (advice-add 'helm-display-mode-line :override 'narf*helm-hide-header)
|
||||||
|
|
||||||
(after! yasnippet (push 'helm-alive-p yas-dont-activate)))
|
(after! yasnippet (push 'helm-alive-p yas-dont-activate)))
|
||||||
|
|
||||||
|
@ -84,6 +82,20 @@
|
||||||
:after helm
|
:after helm
|
||||||
:config (helm-mode 1))
|
:config (helm-mode 1))
|
||||||
|
|
||||||
|
(use-package helm-locate
|
||||||
|
:defer t
|
||||||
|
:init
|
||||||
|
(defvar helm-generic-files-map (make-sparse-keymap)
|
||||||
|
"Generic Keymap for files.")
|
||||||
|
:config (set-keymap-parent helm-generic-files-map helm-map))
|
||||||
|
|
||||||
|
(use-package helm-buffers
|
||||||
|
:commands (helm-buffers-list helm-mini)
|
||||||
|
:config
|
||||||
|
(defvar narf-helm-force-project-buffers nil)
|
||||||
|
(defun helm*buffer-list (&rest _) (narf/get-buffer-names narf-helm-force-project-buffers))
|
||||||
|
(advice-add 'helm-buffer-list :override 'helm*buffer-list))
|
||||||
|
|
||||||
(use-package helm-tags
|
(use-package helm-tags
|
||||||
:commands (helm-tags-get-tag-file helm-etags-select))
|
:commands (helm-tags-get-tag-file helm-etags-select))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue