https://github.com/alan-platform/alanforemacs
https://github.com/alan-platform/alanforemacs
Last synced: 10 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 (over 8 years ago)
- Default Branch: master
- Last Pushed: 2024-03-09T06:52:59.000Z (over 2 years ago)
- Last Synced: 2025-01-10T20:47:50.863Z (over 1 year ago)
- Language: Emacs Lisp
- Size: 828 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 [](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))
```
