An Emacs major mode for Hy, lispy python, providing support for:
- Syntax Highlighting
- Auto-completion
- Eldoc and documentation lookup
- Shell integration
- Hy constructs like bracket strings
Spacemacs users - Hy has its own layer in its dev branch.
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.
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:
- Activate a virtual environment if desired (in emacs with
pyvenv-workon
) - clone jedhy then install it via eg.
pip install -e "~/dev/jedhy"
. M-x run-hy-internal
- (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.
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.