Skip to content

jams2/hy-mode

Repository files navigation

An Emacs major mode for Hy, lispy python, providing support for:

  1. Syntax Highlighting
  2. Auto-completion
  3. Eldoc and documentation lookup
  4. Shell integration
  5. Hy constructs like bracket strings

Spacemacs users - Hy has its own layer in its dev branch.

Installation

Master branch is currently in development. Please use the latest tagged release for a smoother experience.

hy-mode requires Emacs 24+ and is available in MELPA.

IDE Features

Auto-installation and management is being developed, in the meantime:

Autocompletion, doc introspection, and more is implemented as a separate Hy library https://github.com/ekaschalk/jedhy.

Support for jedhy is now fully established but currently manually enabled.

To get IDE Features while I make the process automatic:

  1. Activate a virtual environment if desired (in emacs with pyvenv-workon)
  2. clone jedhy then install it via eg. pip install -e "~/dev/jedhy".
  3. M-x run-hy-internal
  4. (optional) send imports/requires/sys.path.extend in the current file to update jedhy’s namespace with M-x hy-shell-update-imports

Emacs users can add company-hy to company-backends. Spacemacs users can enable company with:

(spacemacs|add-company-backends
  :backends company-hy
  :modes hy-mode inferior-hy-mode)

The precise features enabled are: company-mode, eldoc-mode, and M-x hy-describe-thing-at-point for looking up docs of symbol at point.

Contributing

hy-mode is well-tested. It uses buttercup rather than ert.

Execute tests after running cask install with the command: cask exec buttercup -L .

Process-based tests currently rely on setting hy-test--pyvenv-name to the name of a virtual environment containing Hy, see hy-test.el. If not set, then a warning will be given and process-based tests will be skipped.

About

Hy mode for Emacs

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Emacs Lisp 100.0%