mirror of
https://github.com/jimeh/.emacs.d.git
synced 2026-02-19 13:46:41 +00:00
feat(completion): replace orderless with fussy
Use fussy instead of orderless for filtering and scoring/ordering completion candidates. This seems to overall order results in a much better way than just orderless. Technically orderless is still used to filter the candidate list, but fzf-native is used to score/order the results.
This commit is contained in:
@@ -52,7 +52,7 @@
|
||||
|
||||
;; Completion Systems and Interfaces
|
||||
(require 'siren-vertico)
|
||||
(require 'siren-orderless)
|
||||
(require 'siren-fussy)
|
||||
|
||||
;; Linting
|
||||
(require 'siren-flycheck)
|
||||
|
||||
42
modules/editor/siren-fussy.el
Normal file
42
modules/editor/siren-fussy.el
Normal file
@@ -0,0 +1,42 @@
|
||||
;;; siren-fussy.el --- jimeh's Emacs Siren: fussy configuration.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; Basic configuration for fussy.
|
||||
|
||||
;;; Code:
|
||||
|
||||
(use-package fussy
|
||||
:ensure 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)
|
||||
|
||||
:preface
|
||||
(defun siren-fussy--company-transform-advice (f &rest args)
|
||||
"Manage `company-transformers'."
|
||||
(let ((company-transformers '(fussy-company-sort-by-completion-score)))
|
||||
(apply f args)))
|
||||
|
||||
:config
|
||||
(add-to-list 'completion-styles 'fussy)
|
||||
(advice-add 'company--transform-candidates
|
||||
: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
|
||||
@@ -77,6 +77,8 @@
|
||||
("flyspell-correct" . "7d7b6b01188bd28e20a13736ac9f36c3367bd16e")
|
||||
("forge" . "05babf69068de7a982bd2e8ad888f37dc7319003")
|
||||
("frame-local" . "7ee1106c3bcd4022f48421f8cb1ef4f995da816e")
|
||||
("fussy" . "1e77aa133b1bed8164a927b9090af839d0383774")
|
||||
("fzf-native" . "8fc9f7e207e2610434745c37b3953f577d257728")
|
||||
("gcmh" . "0089f9c3a6d4e9a310d0791cf6fa8f35642ecfd9")
|
||||
("general.el" . "9651024e7f40a8ac5c3f31f8675d3ebe2b667344")
|
||||
("gh-notify" . "aa4d8bc0c56366d437e7c126e7eedc5938109342")
|
||||
|
||||
Reference in New Issue
Block a user