commit 632cae80b0b23fbf93e6ae74fe3940a7331ef17d from: Lukas Henkel date: Sun Aug 31 12:11:35 2025 UTC Remove old sort hack and make fido use other completion styles commit - 445bbf7d191cbfc9f4ee60ac3bcd68ab40dd8843 commit + 632cae80b0b23fbf93e6ae74fe3940a7331ef17d blob - 1feb8a72f48d55e3f40e0ec763601d421b447a7f blob + abfa152256577ebcba20ea57520745b4a34d3eee --- init.el +++ init.el @@ -281,14 +281,12 @@ (advice-add #'completion--replace :around #'lh/advice-fix-minibuffer-consult) -;; file-name-all-completions seems to return file names in whatever order the -;; filesystem feels like returning. This is super annoying with the flex -;; completion style. If the FS returns "barfoo" before "foobar", flex completion -;; will match "barfoo" first. This advice sorts the file name list. -(defun lh/advice-sort-file-name-all-completions (files) - (sort files #'string<)) +(defun lh/advice-fido-setup (func &rest args) + (prog1 + (apply func args) + (setq-local completion-styles '(basic substring initials flex)))) -(advice-add 'file-name-all-completions :filter-return 'lh/advice-sort-file-name-all-completions) +(advice-add 'icomplete--fido-mode-setup :around #'lh/advice-fido-setup) (setq completion-ignore-case t)