[compleseus] fix hack for company-capf (#15652)

This commit is contained in:
thanhvg 2022-07-20 21:58:12 -06:00 committed by GitHub
parent d428d71a1f
commit 5dc773e90f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -290,11 +290,11 @@
(defun compleseus/init-orderless ()
(use-package orderless
:init
;; company-capf is messed up with orderless
;; https://github.com/oantolin/orderless/issues/48#issuecomment-856750410
;; too intrusive and disrupts lsp
(define-advice company-capf (:around (orig-fun &rest args) set-completion-styles)
;; when lsp is on stay away
(if lsp-completion-mode
(if (bound-and-true-p lsp-completion-mode)
(apply orig-fun args)
(let ((completion-styles '(basic partial-completion orderless)))
(apply orig-fun args))))