2017-02-19 18:57:16 -05:00
|
|
|
;;; lang/lua/config.el --- lua + Love2D
|
2015-06-15 09:06:10 +02:00
|
|
|
|
2017-02-19 18:57:16 -05:00
|
|
|
(@def-package lua-mode
|
2015-06-15 09:06:10 +02:00
|
|
|
:mode "\\.lua$"
|
|
|
|
:interpreter "lua"
|
2017-02-19 18:57:16 -05:00
|
|
|
:init
|
|
|
|
(add-hook 'lua-mode-hook 'flycheck-mode)
|
2016-05-01 01:10:30 -04:00
|
|
|
:config
|
2017-02-19 18:57:16 -05:00
|
|
|
(@set :company-backend 'lua-mode '(company-lua company-yasnippet))
|
|
|
|
(@set :electric 'lua-mode :words "else" "end")
|
|
|
|
(@set :repl 'lua-mode '+lua/repl)
|
2016-10-05 12:50:02 +02:00
|
|
|
|
|
|
|
;; sp's lua-specific rules are obnoxious, so we disable them
|
|
|
|
(setq sp-pairs (delete (assq 'lua-mode sp-pairs) sp-pairs)))
|
2015-06-15 09:06:10 +02:00
|
|
|
|
2016-05-01 17:23:37 -04:00
|
|
|
|
2017-02-19 18:57:16 -05:00
|
|
|
(@def-package company-lua
|
|
|
|
:after lua-mode)
|
|
|
|
|
|
|
|
|
|
|
|
(@def-package moonscript
|
2016-05-01 17:23:37 -04:00
|
|
|
:mode ("\\.moon$" . moonscript-mode)
|
|
|
|
:config
|
|
|
|
(push '(moonscript-mode moonscript-indent-offset) editorconfig-indentation-alist))
|
|
|
|
|
2017-02-19 18:57:16 -05:00
|
|
|
|
|
|
|
;;
|
|
|
|
;; TODO Frameworks
|
2016-04-16 21:36:24 -04:00
|
|
|
;;
|
2017-02-19 18:57:16 -05:00
|
|
|
|
|
|
|
;; (def-project-type! love "♥"
|
|
|
|
;; :modes (lua-mode markdown-mode json-mode)
|
|
|
|
;; :files ("main.lua" "conf.lua")
|
|
|
|
;; :build ("open -a love.app '%s'" "main.lua"))
|
|
|
|
|
|
|
|
;; (def-project-type! hammerspoon "hammer"
|
|
|
|
;; :modes (lua-mode markdown-mode)
|
|
|
|
;; :match "/\\.?hammerspoon/.+\\.lua$"
|
|
|
|
;; :build "open hammerspoon://reload")
|
|
|
|
|