doomemacs/modules/lang/lua/autoload.el
Henrik Lissner 9a02bd8ac8
Minor refactors across the board
- when-let* -> when-let
- Fix projectile-locate-dominating-file for connected remote files
2019-06-26 14:31:06 +02:00

20 lines
580 B
EmacsLisp

;;; lang/lua/autoload.el -*- lexical-binding: t; -*-
;;;###autoload
(defun +lua/open-repl ()
"Open Lua REPL."
(interactive)
(lua-start-process "lua" "lua")
(pop-to-buffer lua-process-buffer))
;;;###autoload
(defun +lua/run-love-game ()
"Run the current project with Love2D."
(interactive)
(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))))))