mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-03 12:27:26 -05:00
mod-love: better love2D support
This commit is contained in:
@ -14,19 +14,18 @@
|
|||||||
:group lua)
|
:group lua)
|
||||||
|
|
||||||
(define-key love-mode-map (kbd "s-b")
|
(define-key love-mode-map (kbd "s-b")
|
||||||
(lambda() (shell-command (concat "love " default-directory))))
|
(lambda() (interactive) (shell-command (concat "open -a love.app " default-directory))))
|
||||||
|
|
||||||
(add-hook 'lua-mode-hook
|
(add-hook 'lua-mode-hook
|
||||||
(lambda()
|
(lambda()
|
||||||
(if (string-match "\\.love/.+\\.lua" default-directory)
|
(if (string-match "\\.love/.+\\.lua\\'" (buffer-file-name))
|
||||||
(love-mode t))
|
(love-mode t))
|
||||||
|
|
||||||
(nmap lua-mode-map (kbd "s-r")
|
(nmap lua-mode-map (kbd "s-r")
|
||||||
(lambda() (interactive) (shell-command-on-region (point-min) (point-max) "lua")))
|
(lambda() (interactive) (shell-command-on-region (point-min) (point-max) "lua")))
|
||||||
(vmap lua-mode-map (kbd "s-r")
|
(vmap lua-mode-map (kbd "s-r")
|
||||||
(lambda() (interactive) (shell-command-on-region (region-beginning) (region-end) "lua")))
|
(lambda() (interactive) (shell-command-on-region (region-beginning) (region-end) "lua")))
|
||||||
|
))))
|
||||||
))))
|
|
||||||
|
|
||||||
;;
|
;;
|
||||||
(provide 'mod-love)
|
(provide 'mod-love)
|
||||||
|
Reference in New Issue
Block a user