Skip to content

Commit ba0cf4d

Browse files
authored
Add shim for sly (#503)
1 parent f553db1 commit ba0cf4d

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

meow-shims.el

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,25 @@ Argument ENABLE non-nil means turn on."
231231
(add-hook 'cider--debug-mode-hook 'meow--cider-debug-hook-function)
232232
(remove-hook 'cider--debug-mode-hook 'meow--cider-debug-hook-function)))
233233

234+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
235+
;; sly (db)
236+
237+
(defvar meow--sly-setup nil)
238+
239+
(defun meow--sly-debug-hook-function ()
240+
"Switch meow state when entering/leaving sly-db-mode."
241+
(if (bound-and-true-p sly-db-mode-hook)
242+
(meow--switch-to-motion)
243+
(meow--switch-to-motion)))
244+
245+
(defun meow--setup-sly (enable)
246+
"Setup sly.
247+
Argument ENABLE non-nil means turn on."
248+
(setq meow--sly-setup enable)
249+
(if enable
250+
(add-hook 'sly-db-hook 'meow--sly-debug-hook-function)
251+
(remove-hook 'sly-db-hook 'meow--sly-debug-hook-function)))
252+
234253
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
235254
;; which-key
236255

@@ -305,6 +324,7 @@ Argument ENABLE non-nil means turn on."
305324
(eval-after-load "company" (lambda () (meow--setup-company t)))
306325
(eval-after-load "polymode" (lambda () (meow--setup-polymode t)))
307326
(eval-after-load "cider" (lambda () (meow--setup-cider t)))
327+
(eval-after-load "sly" (lambda () (meow--setup-sly t)))
308328
(eval-after-load "which-key" (lambda () (meow--setup-which-key t)))
309329
(eval-after-load "undo-tree" (lambda () (meow--setup-undo-tree t)))
310330
(eval-after-load "diff-hl" (lambda () (meow--setup-diff-hl t)))

0 commit comments

Comments
 (0)