[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/meow 532b302bb2: Add shim for corfu (#662)
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/meow 532b302bb2: Add shim for corfu (#662) |
Date: |
Wed, 6 Nov 2024 19:00:00 -0500 (EST) |
branch: elpa/meow
commit 532b302bb2da843ac8ae1541e9017d50e20cfbe1
Author: Daniel Arnqvist <daniel.arnqvist@gmail.com>
Commit: GitHub <noreply@github.com>
Add shim for corfu (#662)
---
meow-shims.el | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/meow-shims.el b/meow-shims.el
index a6c18e425f..d8d86eb247 100644
--- a/meow-shims.el
+++ b/meow-shims.el
@@ -105,6 +105,24 @@ Argument ENABLE non-nil means turn on."
(add-hook 'meow-insert-exit-hook #'meow--company-maybe-abort-advice)
(remove-hook 'meow-insert-exit-hook #'meow--company-maybe-abort-advice)))
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; corfu
+
+(defvar meow--corfu-setup nil
+ "Whether already setup corfu.")
+
+(defun meow--corfu-maybe-abort-advice ()
+ "Adviced for `meow-insert-exit'."
+ (when corfu-mode (corfu-quit)))
+
+(defun meow--setup-corfu (enable)
+ "Setup for corfu.
+Argument ENABLE non-nil means turn on."
+ (setq meow--corfu-setup enable)
+ (if enable
+ (add-hook 'meow-insert-exit-hook #'meow--corfu-maybe-abort-advice)
+ (remove-hook 'meow-insert-exit-hook #'meow--corfu-maybe-abort-advice)))
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; repeat-map
@@ -466,6 +484,7 @@ Argument ENABLE non-nil means turn on."
(eval-after-load "magit" (lambda () (meow--setup-magit t)))
(eval-after-load "wgrep" (lambda () (meow--setup-wgrep t)))
(eval-after-load "company" (lambda () (meow--setup-company t)))
+ (eval-after-load "corfu" (lambda () (meow--setup-corfu t)))
(eval-after-load "polymode" (lambda () (meow--setup-polymode t)))
(eval-after-load "cider" (lambda () (meow--setup-cider t)))
(eval-after-load "sly" (lambda () (meow--setup-sly t)))
@@ -486,6 +505,7 @@ Argument ENABLE non-nil means turn on."
(when meow--edebug-setup (meow--setup-edebug nil))
(when meow--magit-setup (meow--setup-magit nil))
(when meow--company-setup (meow--setup-company nil))
+ (when meow--corfu-setup (meow--setup-corfu nil))
(when meow--wgrep-setup (meow--setup-wgrep nil))
(when meow--polymode-setup (meow--setup-polymode nil))
(when meow--cider-setup (meow--setup-cider nil))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [nongnu] elpa/meow 532b302bb2: Add shim for corfu (#662),
ELPA Syncer <=