Skip to content

Commit b47d1fa

Browse files
authored
Add shim for realgud (#512)
1 parent ec94fa6 commit b47d1fa

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
@@ -250,6 +250,25 @@ Argument ENABLE non-nil means turn on."
250250
(add-hook 'sly-db-hook 'meow--sly-debug-hook-function)
251251
(remove-hook 'sly-db-hook 'meow--sly-debug-hook-function)))
252252

253+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
254+
;; realgud (debug)
255+
256+
(defvar meow--realgud-setup nil)
257+
258+
(defun meow--realgud-debug-hook-function ()
259+
"Switch meow state when entering/leaving realgud-short-key-mode."
260+
(if (bound-and-true-p realgud-short-key-mode)
261+
(meow--switch-to-motion)
262+
(meow--switch-to-normal)))
263+
264+
(defun meow--setup-realgud (enable)
265+
"Setup realgud.
266+
Argument ENABLE non-nil means turn on."
267+
(setq meow--realgud-setup enable)
268+
(if enable
269+
(add-hook 'realgud-short-key-mode-hook 'meow--realgud-debug-hook-function)
270+
(remove-hook 'realgud-short-key-mode-hook 'meow--realgud-debug-hook-function)))
271+
253272
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
254273
;; which-key
255274

@@ -325,6 +344,7 @@ Argument ENABLE non-nil means turn on."
325344
(eval-after-load "polymode" (lambda () (meow--setup-polymode t)))
326345
(eval-after-load "cider" (lambda () (meow--setup-cider t)))
327346
(eval-after-load "sly" (lambda () (meow--setup-sly t)))
347+
(eval-after-load "realgud" (lambda () (meow--setup-realgud t)))
328348
(eval-after-load "which-key" (lambda () (meow--setup-which-key t)))
329349
(eval-after-load "undo-tree" (lambda () (meow--setup-undo-tree t)))
330350
(eval-after-load "diff-hl" (lambda () (meow--setup-diff-hl t)))

0 commit comments

Comments
 (0)