Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alan-platform/alanforemacs
https://github.com/alan-platform/alanforemacs
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/alan-platform/alanforemacs
- Owner: alan-platform
- License: mit
- Created: 2017-10-13T07:21:58.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2024-03-09T06:52:59.000Z (10 months ago)
- Last Synced: 2024-03-09T07:37:30.036Z (10 months ago)
- Language: Emacs Lisp
- Size: 813 KB
- Stars: 6
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Alan For Emacs
A major mode for editing Alan files. It provides:
- Syntax highlighting.
- Display the current context (path) at point.
- Automatic indentation.
- Flycheck integration.
- Simple xref backend.## Installation
- Put alan-mode.el in your load-path.
- Install it from [![MELPA](https://melpa.org/packages/alan-mode-badge.svg)](https://melpa.org/#/alan-mode) using package-install M-x package-install [ret] alan-mode## Configuration
To setup up FlyCheck add the following snippet to your init.
```Emacs Lisp
(add-hook 'alan-mode-hook
(lambda ()
(flycheck-mode +1)
))
```When in an empty Alan block (e.g. `{ }`) a newline yields the following result:
```
{
|}
```In most cases this is more useful:
```
{
|
}
```Alan mode provides an electric layout rule (`alan-add-line-in-braces-rule`). Set it up in your init file, preferably in the `alan-mode-hook`.
```
(electric-layout-mode 1)
(set (make-variable-buffer-local 'electric-layout-rules) (list alan-add-line-in-braces-rule))
```![screenshot](/screenshot.png)