Gate fuzzy search config behind +fuzzy module flag
Fuzzy search, on its own, is inaccurate when individual candidates are long. Helm's non-fuzzy search backend doesn't have this problem. This adds `flx` sorting to fuzzy search to make up for this.
This commit is contained in:
parent
ce4327e3a9
commit
dcd29762e7
1 changed files with 30 additions and 15 deletions
|
@ -38,21 +38,13 @@
|
||||||
(def-package! helm
|
(def-package! helm
|
||||||
:after helm-mode
|
:after helm-mode
|
||||||
:init
|
:init
|
||||||
(setq
|
(setq helm-candidate-number-limit 50
|
||||||
;; Fuzzy matching is pretty handy!
|
|
||||||
helm-mode-fuzzy-match t
|
|
||||||
helm-buffers-fuzzy-matching t
|
|
||||||
helm-apropos-fuzzy-match t
|
|
||||||
helm-M-x-fuzzy-match t
|
|
||||||
helm-recentf-fuzzy-match t
|
|
||||||
helm-projectile-fuzzy-match t
|
|
||||||
;; Display extraineous helm UI elements
|
;; Display extraineous helm UI elements
|
||||||
helm-display-header-line nil
|
helm-display-header-line nil
|
||||||
helm-ff-auto-update-initial-value nil
|
helm-ff-auto-update-initial-value nil
|
||||||
helm-find-files-doc-header nil
|
helm-find-files-doc-header nil
|
||||||
;; 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 50)
|
|
||||||
|
|
||||||
:config
|
:config
|
||||||
(setq projectile-completion-system 'helm)
|
(setq projectile-completion-system 'helm)
|
||||||
|
@ -86,6 +78,29 @@
|
||||||
(setq-local cursor-type nil))))
|
(setq-local cursor-type nil))))
|
||||||
(add-hook 'helm-minibuffer-set-up-hook #'+helm*hide-minibuffer-maybe))
|
(add-hook 'helm-minibuffer-set-up-hook #'+helm*hide-minibuffer-maybe))
|
||||||
|
|
||||||
|
|
||||||
|
(def-package! helm-flx
|
||||||
|
:when (featurep! +fuzzy)
|
||||||
|
:after helm
|
||||||
|
:init
|
||||||
|
(setq helm-candidate-number-limit 40
|
||||||
|
helm-M-x-fuzzy-match t
|
||||||
|
helm-apropos-fuzzy-match t
|
||||||
|
helm-bookmark-show-location t
|
||||||
|
helm-buffers-fuzzy-matching t
|
||||||
|
helm-completion-in-region-fuzzy-match t
|
||||||
|
helm-file-cache-fuzzy-match t
|
||||||
|
helm-imenu-fuzzy-match t
|
||||||
|
helm-locate-fuzzy-match t
|
||||||
|
helm-flx-for-helm-locate t
|
||||||
|
helm-mode-fuzzy-match t
|
||||||
|
helm-projectile-fuzzy-match t
|
||||||
|
helm-recentf-fuzzy-match t
|
||||||
|
helm-semantic-fuzzy-match t)
|
||||||
|
:config
|
||||||
|
(helm-flx-mode +1))
|
||||||
|
|
||||||
|
|
||||||
(def-package! helm-locate
|
(def-package! helm-locate
|
||||||
:defer t
|
:defer t
|
||||||
:init (defvar helm-generic-files-map (make-sparse-keymap))
|
:init (defvar helm-generic-files-map (make-sparse-keymap))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue