mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
lang/lua: improve main.lua detection in +lua/run-love-game
This commit is contained in:
@ -11,9 +11,10 @@
|
||||
(defun +lua/run-love-game ()
|
||||
"Run the current project with Love2D."
|
||||
(interactive)
|
||||
(async-shell-command
|
||||
(format "%s %s"
|
||||
(or (executable-find "love")
|
||||
(if IS-MAC "open -a love.app"))
|
||||
(shell-quote-argument (doom-project-root)))))
|
||||
(when-let* ((root (locate-dominating-file buffer-file-name "main.lua")))
|
||||
(async-shell-command
|
||||
(format "%s %s"
|
||||
(or (executable-find "love")
|
||||
(if IS-MAC "open -a love.app"))
|
||||
(shell-quote-argument (file-name-directory root))))))
|
||||
|
||||
|
Reference in New Issue
Block a user