diff --git a/.emacs.d/include/misc.el b/.emacs.d/include/misc.el index cc9367f..2f5b1eb 100644 --- a/.emacs.d/include/misc.el +++ b/.emacs.d/include/misc.el @@ -9,6 +9,7 @@ (require 'lsp-mode) (require 'git-gutter) (require 'seq) +(require 'justl) (defun config-compile () "(Re)compile the current Emacs configuration." @@ -267,6 +268,21 @@ ("FIXME" . "#ffffff") ("XXXX*" . "#ffffff"))) +;; justl + +(defun justl-recipes () + "Pick and execute a just recipe." + (interactive) + (let* ((justfile (justl--find-justfile default-directory)) + (raw-entries (justl--get-recipes justfile)) + (entry-names (mapcar #'justl--recipe-name raw-entries)) + (just-recipe (completing-read "just recipe: " entry-names nil t nil))) + (justl--exec + justl-executable + just-recipe + (append (transient-args 'justl-help-popup) + (list just-recipe))))) + ;; rjsx (setq auto-mode-alist (cons '("\\.tsx$" . rjsx-mode) auto-mode-alist)) diff --git a/.emacs.d/init.el b/.emacs.d/init.el index 1247d4b..7b3eb13 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -189,7 +189,7 @@ (use-package rjsx-mode :straight t) (use-package just-mode :straight t) (use-package justl :straight t - :bind (("C-c j" . #'justl))) + :bind (("C-c j" . #'justl-recipes))) (use-package scribble-mode :straight t) (use-package go-mode :straight t) (use-package auctex :straight t)