Skip to content

Commit

Permalink
Add shim for sly (#503)
Browse files Browse the repository at this point in the history
  • Loading branch information
jgarte committed Sep 16, 2023
1 parent f553db1 commit ba0cf4d
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions meow-shims.el
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,25 @@ Argument ENABLE non-nil means turn on."
(add-hook 'cider--debug-mode-hook 'meow--cider-debug-hook-function)
(remove-hook 'cider--debug-mode-hook 'meow--cider-debug-hook-function)))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; sly (db)

(defvar meow--sly-setup nil)

(defun meow--sly-debug-hook-function ()
"Switch meow state when entering/leaving sly-db-mode."
(if (bound-and-true-p sly-db-mode-hook)
(meow--switch-to-motion)
(meow--switch-to-motion)))

(defun meow--setup-sly (enable)
"Setup sly.
Argument ENABLE non-nil means turn on."
(setq meow--sly-setup enable)
(if enable
(add-hook 'sly-db-hook 'meow--sly-debug-hook-function)
(remove-hook 'sly-db-hook 'meow--sly-debug-hook-function)))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; which-key

Expand Down Expand Up @@ -305,6 +324,7 @@ Argument ENABLE non-nil means turn on."
(eval-after-load "company" (lambda () (meow--setup-company 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)))
(eval-after-load "which-key" (lambda () (meow--setup-which-key t)))
(eval-after-load "undo-tree" (lambda () (meow--setup-undo-tree t)))
(eval-after-load "diff-hl" (lambda () (meow--setup-diff-hl t)))
Expand Down

0 comments on commit ba0cf4d

Please sign in to comment.