mirror of
https://github.com/doomemacs/doomemacs
synced 2025-09-14 15:46:56 -05:00
fix(coq): corfu integration w/ company-coq
Close: #8491 Co-authored-by: qcfu-bu <qcfu-bu@users.noreply.github.com>
This commit is contained in:
@@ -77,18 +77,15 @@
|
|||||||
:references #'company-coq-grep-symbol
|
:references #'company-coq-grep-symbol
|
||||||
:documentation #'company-coq-doc)
|
:documentation #'company-coq-doc)
|
||||||
|
|
||||||
(setq company-coq-disabled-features '(hello company-defaults spinner))
|
(setq company-coq-disabled-features '(hello company company-defaults spinner))
|
||||||
|
|
||||||
(cond ((modulep! :completion corfu)
|
(cond ((modulep! :completion corfu)
|
||||||
;; HACK: company-coq activates `company-mode', though it's not really
|
;; HACK: company-coq activates `company-mode', though it's not really
|
||||||
;; needed when we're relying on Corfu, hence these hacks:
|
;; needed when we're relying on Corfu, hence these hacks:
|
||||||
(add-hook! 'coq-mode-local-vars-hook
|
(add-hook! 'coq-mode-local-vars-hook
|
||||||
(defun +coq-init-capf-completion-h ()
|
(defun +coq-init-capf-completion-h ()
|
||||||
(when (bound-and-true-p company-mode)
|
(dolist (b '(company-coq-master-backend company-coq-math-symbols-backend))
|
||||||
(company-mode -1))
|
(add-to-list 'completion-at-point-functions (cape-company-to-capf b)))))
|
||||||
(add-hook 'completion-at-point-functions
|
|
||||||
(cape-company-to-capf 'company-coq-master-backend)
|
|
||||||
nil t)))
|
|
||||||
(defadvice! +coq--proof-goto-point-advice (&rest _)
|
(defadvice! +coq--proof-goto-point-advice (&rest _)
|
||||||
:override #'company-coq--proof-goto-point-advice
|
:override #'company-coq--proof-goto-point-advice
|
||||||
(when (bound-and-true-p company-candidates)
|
(when (bound-and-true-p company-candidates)
|
||||||
|
Reference in New Issue
Block a user