Skip to content

Commit 4345fcf

Browse files
committed
tweak(pet): add integration for quickrun
1 parent 2d2ffb2 commit 4345fcf

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

modules/me-tools.el

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,15 @@
144144
:straight t
145145
:when (and (or (executable-find "dasel") (executable-find "yq"))
146146
(or (+emacs-features-p 'sqlite3) (executable-find "sqlite3")))
147+
:hook (pet-mode . +pet-quickrun-setup)
147148
:init
148-
(add-hook 'python-base-mode-hook 'pet-mode -10))
149+
(add-hook 'python-base-mode-hook 'pet-mode -10)
150+
:config
151+
(defun +pet-quickrun-setup ()
152+
(with-eval-after-load 'quickrun
153+
(let* ((cmd-alist (copy-alist (alist-get "python" quickrun--language-alist nil nil #'equal))))
154+
(setcar (assq :command cmd-alist) (pet-executable-find "python"))
155+
(setq-local quickrun-option-cmd-alist cmd-alist)))))
149156

150157

151158
;; Adds the "node_modules/.bin" directory to the buffer "exec_path"

0 commit comments

Comments
 (0)