Skip to content

Commit

Permalink
Add shim for realgud (#512)
Browse files Browse the repository at this point in the history
  • Loading branch information
lemyx authored Sep 28, 2023
1 parent ec94fa6 commit b47d1fa
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 @@ -250,6 +250,25 @@ Argument ENABLE non-nil means turn on."
(add-hook 'sly-db-hook 'meow--sly-debug-hook-function)
(remove-hook 'sly-db-hook 'meow--sly-debug-hook-function)))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; realgud (debug)

(defvar meow--realgud-setup nil)

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

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

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

Expand Down Expand Up @@ -325,6 +344,7 @@ Argument ENABLE non-nil means turn on."
(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 "realgud" (lambda () (meow--setup-realgud 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 b47d1fa

Please sign in to comment.