orbitz / ponylang-mode

:horse: An Emacs mode for editing Pony code.

Home Page:https://www.ponylang.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MELPA MELPA Stable

Pony Mode

An Emacs mode that provides syntax highlighting (font-lock) and indentation for the Pony programming language.

At the moment, ponylang-mode is fairly new and immature. From the standpoint of indentation, it should work for about 95% of use cases. In order to work for the rest, it is going to require a rewrite. If you are interested in contributing to Emacs tooling for Pony, please get in touch. Contributions and feedback are welcome.

Installation

This package can be obtain from MELPA or MELPA Stable. The master branch is continuously deployed to MELPA, and released versions are deployed to MELPA Stable.

M-x package-install [RET] ponylang-mode [RET]

Then somewhere in your Emacs configuration, call:

(require 'ponylang-mode)

Configuration

Right now ponylang-mode doesn't take a lot of configuration (i.e. it's too simple to need any). If you want to make sure your indentation matches that in the ponyc project's examples, you can use something like this:

(add-hook
  'ponylang-mode-hook
  (lambda ()
    (set-variable 'indent-tabs-mode nil)
    (set-variable 'tab-width 2)))

If you're using use-package to manage your configuration, you can configure ponylang-mode like so:

(use-package ponylang-mode
  :ensure t
  :config
  (progn
    (add-hook
     'ponylang-mode-hook
     (lambda ()
       (set-variable 'indent-tabs-mode nil)
       (set-variable 'tab-width 2)))))

Testing

The tests require ERT. To run them, eval ponylang-test.el and run M-x ert [RET] t [RET]

Attribution

Big thanks to Austin Bingham who did the first version of ponylang-mode. We wouldn't be where we are now without your initial work Austin!

About

:horse: An Emacs mode for editing Pony code.

https://www.ponylang.org/


Languages

Language:Emacs Lisp 100.0%