A basic major mode for editing MoonScript, a preprocessed language for Lua which shares many similarities with CoffeeScript.
Also includes a very basic major mode for the experimental MoonScript REPL.
This mode started out as a modification of stuff found in @GriffinSchneider's Emacs configs.
The easiest way to get the mode is to install the moonscript package from the MELPA package archive.
$ cd ~/.emacs.d/vendor
$ git clone https://github.com/k2052/moonscript-mode.git
And add following to your .emacs file:
(add-to-list 'load-path "~/.emacs.d/vendor/moonscript-mode")
(require 'moonscript)
(require 'moonscript-repl)
If you load up a moonscript REPL (see https://github.com/leafo/moonscript/wiki/Moonscriptrepl) you can then hit:
M-X moonscript-repl-mode
to activate.
Improvements and more docs will come as we need them.
The package ships with an ERT test suite and a Makefile.
Assuming a recent Emacs is on your PATH:
make check # byte-compile (warnings are errors) and run tests
make test # run the ERT test suite only
make compile # byte-compile the sources onlyTo run a single test from within Emacs:
M-x ert RET moonscript-indent-line/indents-relative-to-prev RETThe suite has no external dependencies beyond Emacs itself; ERT is part of the standard distribution.
If you found this repo useful please consider supporting me on Gittip or sending me some
bitcoin 1csGsaDCFLRPPqugYjX93PEzaStuqXVMu