doomemacs/modules/lang/lua/config.el
Henrik Lissner 588359cc5f
Replace :eval/:repl with autodef functions
+ :eval => set-eval-handler!
+ :repl => set-repl-handler!
+ Updates all internal references.
2018-06-15 16:20:20 +02:00

32 lines
829 B
EmacsLisp

;;; lang/lua/config.el -*- lexical-binding: t; -*-
(after! lua-mode
(add-hook 'lua-mode-hook #'flycheck-mode)
(set! :lookup 'lua-mode :documentation 'lua-search-documentation)
(set-electric! 'lua-mode :words '("else" "end"))
(set-repl-handler! 'lua-mode #'+lua/repl)
(set-company-backend! 'lua-mode '(company-lua company-yasnippet))
(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))
(after! moonscript
(defvaralias 'moonscript-indent-offset 'tab-width))
;;
;; Frameworks
;;
(def-project-mode! +lua-love-mode
:modes (lua-mode markdown-mode json-mode)
:files (and "main.lua" "conf.lua"))