Hack around company

This commit is contained in:
Maciej 2024-10-21 20:58:55 +03:00
parent a1fd85896f
commit 70418a27c3
Signed by: maciej
GPG key ID: 41D62D42D3B0D765

View file

@ -33,6 +33,7 @@
(global-company-mode t) (global-company-mode t)
;; Hacks for orderless
(defun just-one-face (fn &rest args) (defun just-one-face (fn &rest args)
(let ((orderless-match-faces [completions-common-part])) (let ((orderless-match-faces [completions-common-part]))
(apply fn args))) (apply fn args)))
@ -40,7 +41,7 @@
(advice-add 'company-capf--candidates :around #'just-one-face) (advice-add 'company-capf--candidates :around #'just-one-face)
(defun company-completion-styles (capf-fn &rest args) (defun company-completion-styles (capf-fn &rest args)
(let ((completion-styles '(basic partial-match))) (let ((completion-styles '(partial-completion basic)))
(apply capf-fn args))) (apply capf-fn args)))
(advice-add 'company-capf :around #'company-completion-styles) (advice-add 'company-capf :around #'company-completion-styles)