aboutsummaryrefslogtreecommitdiff
path: root/emacs/.emacs.d/init
diff options
context:
space:
mode:
Diffstat (limited to 'emacs/.emacs.d/init')
-rw-r--r--emacs/.emacs.d/init/ycp-complete.el23
1 files changed, 21 insertions, 2 deletions
diff --git a/emacs/.emacs.d/init/ycp-complete.el b/emacs/.emacs.d/init/ycp-complete.el
index c088356..d123989 100644
--- a/emacs/.emacs.d/init/ycp-complete.el
+++ b/emacs/.emacs.d/init/ycp-complete.el
@@ -156,7 +156,10 @@
;;; corfu does not work well in gud as it "flushes" completion
;;; suggestions to the buffer
;;; https://github.com/minad/corfu/issues/157
- (setq global-corfu-modes '((not gud-mode) t))
+ ;; Only company modes works with bbdb email completion in
+ ;; message-mode, so we remove corfu from message-mode to avoid
+ ;; overlapping multiple completion dropdowns
+ (setq global-corfu-modes '((not gud-mode) (not message-mode) t))
)
;;; We still need company mode because corfu does not work well in
@@ -164,7 +167,16 @@
(my-package company
(:install t)
(:delay 5)
+ ;; corfu does not complete email fields using bbdb
(add-hook 'message-mode-hook #'company-mode)
+ ;; for some reason, having a t in the completion-at-point-functions
+ ;; causes company to hang in message-mode
+ (add-hook 'message-mode-hook
+ (lambda ()
+ (setq-local completion-at-point-functions
+ (delq t
+ completion-at-point-functions))
+ ))
(setq company-idle-delay .1
company-minimum-prefix-length 3
company-selection-wrap-around t
@@ -192,7 +204,14 @@
(message-mode ?' ?')))
(dolist (backend '(cape-elisp-symbol cape-keyword cape-file cape-history
cape-dabbrev))
- (add-to-list 'completion-at-point-functions backend)))
+ (add-to-list 'completion-at-point-functions backend))
+ ;; for some reason, cape-dabbrev causes message-mode to hang with
+ ;; company mode as well
+ ;; (add-hook 'message-mode-hook
+ ;; (lambda ()
+ ;; (add-to-list 'completion-at-point-functions
+ ;; 'cape-dabbrev)))
+ )
(my-package imenu
(:delay 5)