Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add shim for corfu #662

Merged
merged 1 commit into from
Nov 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions meow-shims.el
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,24 @@
(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)))

Check warning on line 116 in meow-shims.el

View workflow job for this annotation

GitHub Actions / check (26.3, true)

reference to free variable ‘corfu-mode’

Check warning on line 116 in meow-shims.el

View workflow job for this annotation

GitHub Actions / check (27.1, true)

reference to free variable ‘corfu-mode’

Check warning on line 116 in meow-shims.el

View workflow job for this annotation

GitHub Actions / check (28.2, true)

reference to free variable ‘corfu-mode’

Check warning on line 116 in meow-shims.el

View workflow job for this annotation

GitHub Actions / check (28.2, true)

the function ‘corfu-quit’ is not known to be defined.

(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

Expand Down Expand Up @@ -460,13 +478,14 @@
(meow--setup-eldoc t)
(meow--setup-rectangle-mark t)

(eval-after-load "macrostep" (lambda () (meow--setup-macrostep t)))

Check warning on line 481 in meow-shims.el

View workflow job for this annotation

GitHub Actions / check (26.3, true)

`eval-after-load' is for use in configurations, and should rarely be used in packages.

Check warning on line 481 in meow-shims.el

View workflow job for this annotation

GitHub Actions / check (27.1, true)

`eval-after-load' is for use in configurations, and should rarely be used in packages.

Check warning on line 481 in meow-shims.el

View workflow job for this annotation

GitHub Actions / check (28.2, true)

`eval-after-load' is for use in configurations, and should rarely be used in packages.
(eval-after-load "wdired" (lambda () (meow--setup-wdired t)))

Check warning on line 482 in meow-shims.el

View workflow job for this annotation

GitHub Actions / check (26.3, true)

`eval-after-load' is for use in configurations, and should rarely be used in packages.

Check warning on line 482 in meow-shims.el

View workflow job for this annotation

GitHub Actions / check (27.1, true)

`eval-after-load' is for use in configurations, and should rarely be used in packages.

Check warning on line 482 in meow-shims.el

View workflow job for this annotation

GitHub Actions / check (28.2, true)

`eval-after-load' is for use in configurations, and should rarely be used in packages.
(eval-after-load "edebug" (lambda () (meow--setup-edebug t)))

Check warning on line 483 in meow-shims.el

View workflow job for this annotation

GitHub Actions / check (26.3, true)

`eval-after-load' is for use in configurations, and should rarely be used in packages.

Check warning on line 483 in meow-shims.el

View workflow job for this annotation

GitHub Actions / check (27.1, true)

`eval-after-load' is for use in configurations, and should rarely be used in packages.

Check warning on line 483 in meow-shims.el

View workflow job for this annotation

GitHub Actions / check (28.2, true)

`eval-after-load' is for use in configurations, and should rarely be used in packages.
(eval-after-load "magit" (lambda () (meow--setup-magit t)))

Check warning on line 484 in meow-shims.el

View workflow job for this annotation

GitHub Actions / check (26.3, true)

`eval-after-load' is for use in configurations, and should rarely be used in packages.

Check warning on line 484 in meow-shims.el

View workflow job for this annotation

GitHub Actions / check (27.1, true)

`eval-after-load' is for use in configurations, and should rarely be used in packages.

Check warning on line 484 in meow-shims.el

View workflow job for this annotation

GitHub Actions / check (28.2, true)

`eval-after-load' is for use in configurations, and should rarely be used in packages.
(eval-after-load "wgrep" (lambda () (meow--setup-wgrep t)))

Check warning on line 485 in meow-shims.el

View workflow job for this annotation

GitHub Actions / check (26.3, true)

`eval-after-load' is for use in configurations, and should rarely be used in packages.

Check warning on line 485 in meow-shims.el

View workflow job for this annotation

GitHub Actions / check (27.1, true)

`eval-after-load' is for use in configurations, and should rarely be used in packages.

Check warning on line 485 in meow-shims.el

View workflow job for this annotation

GitHub Actions / check (28.2, true)

`eval-after-load' is for use in configurations, and should rarely be used in packages.
(eval-after-load "company" (lambda () (meow--setup-company t)))

Check warning on line 486 in meow-shims.el

View workflow job for this annotation

GitHub Actions / check (27.1, true)

`eval-after-load' is for use in configurations, and should rarely be used in packages.

Check warning on line 486 in meow-shims.el

View workflow job for this annotation

GitHub Actions / check (28.2, true)

`eval-after-load' is for use in configurations, and should rarely be used in packages.
(eval-after-load "corfu" (lambda () (meow--setup-corfu t)))

Check warning on line 487 in meow-shims.el

View workflow job for this annotation

GitHub Actions / check (27.1, true)

`eval-after-load' is for use in configurations, and should rarely be used in packages.

Check warning on line 487 in meow-shims.el

View workflow job for this annotation

GitHub Actions / check (28.2, true)

`eval-after-load' is for use in configurations, and should rarely be used in packages.
(eval-after-load "polymode" (lambda () (meow--setup-polymode t)))

Check warning on line 488 in meow-shims.el

View workflow job for this annotation

GitHub Actions / check (27.1, true)

`eval-after-load' is for use in configurations, and should rarely be used in packages.

Check warning on line 488 in meow-shims.el

View workflow job for this annotation

GitHub Actions / check (28.2, true)

`eval-after-load' is for use in configurations, and should rarely be used in packages.
(eval-after-load "cider" (lambda () (meow--setup-cider t)))
(eval-after-load "sly" (lambda () (meow--setup-sly t)))
(eval-after-load "realgud" (lambda () (meow--setup-realgud t)))
Expand All @@ -486,6 +505,7 @@
(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))
Expand All @@ -496,3 +516,3 @@

;;; meow-shims.el ends here
(provide 'meow-shims)
Loading