doomemacs/modules/lang/lua/config.el

46 lines
1.1 KiB
EmacsLisp
Raw Normal View History

2018-03-18 15:31:32 -04:00
;;; lang/lua/config.el -*- lexical-binding: t; -*-
2015-06-15 09:06:10 +02:00
(def-package! lua-mode
2015-06-15 09:06:10 +02:00
:mode "\\.lua$"
:interpreter "lua"
:init
;; sp's default lua rules are obnoxious, so disable them. Use snippets
;; instead!
(provide 'smartparens-lua)
:config
(add-hook 'lua-mode-hook #'flycheck-mode)
(set! :lookup 'lua-mode :documentation 'lua-search-documentation)
(set! :electric 'lua-mode :words '("else" "end"))
(set! :repl 'lua-mode #'+lua/repl)
(def-menu! +lua/build-menu
"Build/compilation commands for `lua-mode' buffers."
'(("Run Love app" :exec +lua/run-love-game :when +lua-love-mode))
:prompt "Build tasks: ")
(map! :map lua-mode-map
:localleader
:n "b" #'+lua/build-menu))
2015-06-15 09:06:10 +02:00
2016-05-01 17:23:37 -04:00
(def-package! company-lua
:after (:all company lua-mode)
:config
(set! :company-backend 'lua-mode '(company-lua company-yasnippet)))
2017-02-19 18:57:16 -05:00
(def-package! moonscript
2016-05-01 17:23:37 -04:00
:mode ("\\.moon$" . moonscript-mode)
2017-12-08 22:38:49 -05:00
:config (defvaralias 'moonscript-indent-offset 'tab-width))
2016-05-01 17:23:37 -04:00
2017-02-19 18:57:16 -05:00
;;
2017-03-02 18:20:46 -05:00
;; Frameworks
2016-04-16 21:36:24 -04:00
;;
2017-02-19 18:57:16 -05:00
2017-03-02 18:20:46 -05:00
(def-project-mode! +lua-love-mode
:modes (lua-mode markdown-mode json-mode)
:files (and "main.lua" "conf.lua"))
2017-02-19 18:57:16 -05:00