镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

About

An Emacs mode for moonscript

Resources

Stars

16 stars

Watchers

2 watching

Forks

Latest commit

 

History

40 Commits

Folders and files

Repository files navigation

moonscript-mode

Overview

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.

History

This mode started out as a modification of stuff found in @GriffinSchneider's Emacs configs.

Installation

From MELPA

The easiest way to get the mode is to install the moonscript package from the MELPA package archive.

Manual

$ 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)

Usage

With a 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.

Development

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 only

To run a single test from within Emacs:

M-x ert RET moonscript-indent-line/indents-relative-to-prev RET

The suite has no external dependencies beyond Emacs itself; ERT is part of the standard distribution.

Support

If you found this repo useful please consider supporting me on Gittip or sending me some bitcoin 1csGsaDCFLRPPqugYjX93PEzaStuqXVMu

About

An Emacs mode for moonscript

Resources

Stars

16 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages