mirror of
https://github.com/jimeh/.emacs.d.git
synced 2026-02-19 13:46:41 +00:00
feat(editor/fussy): improve completion performance
It seems the fzf-native scoring method can get slow and laggy over time. It seems the flx-rs method does not, and is overall a bit faster. However, flx-rs doesn't give exact matches as high of a score as fzf-native, so scoring might be a bit different than I'm used to. Time will tell if I'll find it annoying enough to switch back to fzf-native. Also switch from orderless to fussy's all-completions backed filtering method. This yields a noticeable improvement in speed, but it does not support multiple search terms separated by space like orderless does. Another potential habit I will need to adjust.
This commit is contained in:
@@ -6,16 +6,39 @@
|
||||
|
||||
;;; Code:
|
||||
|
||||
;; (use-package orderless
|
||||
;; :commands (orderless-filter))
|
||||
|
||||
;; (use-package fzf-native
|
||||
;; :straight (fzf-native :repo "dangduc/fzf-native" :host github
|
||||
;; :files (:defaults "bin"))
|
||||
;; :config
|
||||
;; (fzf-native-load-dyn))
|
||||
|
||||
(use-package flx-rs
|
||||
:straight (flx-rs :repo "jcs-elpa/flx-rs" :fetcher github
|
||||
:files (:defaults "bin"))
|
||||
:config
|
||||
(flx-rs-load-dyn))
|
||||
|
||||
(use-package fussy
|
||||
:ensure t
|
||||
:demand t
|
||||
:custom
|
||||
(completion-category-overrides nil)
|
||||
(completion-ignore-case t)
|
||||
(pcomplete-ignore-case t)
|
||||
|
||||
(fussy-ignore-case t)
|
||||
(fussy-filter-fn 'fussy-filter-orderless-flex)
|
||||
(fussy-score-fn 'fussy-fzf-native-score)
|
||||
|
||||
(fussy-filter-fn
|
||||
'fussy-filter-default
|
||||
;; 'fussy-filter-orderless-flex
|
||||
)
|
||||
|
||||
(fussy-score-fn
|
||||
;; 'fussy-fzf-native-score
|
||||
'flx-rs-score
|
||||
)
|
||||
|
||||
:preface
|
||||
(defun siren-fussy--company-transform-advice (f &rest args)
|
||||
@@ -29,14 +52,7 @@
|
||||
:around 'siren-fussy--company-transform-advice)
|
||||
(setq completion-category-defaults nil))
|
||||
|
||||
(use-package orderless
|
||||
:commands (orderless-filter))
|
||||
|
||||
(use-package fzf-native
|
||||
:straight (fzf-native :repo "dangduc/fzf-native" :host github
|
||||
:files (:defaults "bin"))
|
||||
:config
|
||||
(fzf-native-load-dyn))
|
||||
|
||||
(provide 'siren-fussy)
|
||||
;;; siren-fussy.el ends here
|
||||
|
||||
Reference in New Issue
Block a user