Emacs Major-mode for Elser language.
This mode is derived from lisp-mode and provides very basic syntax highlighting and indentation for Elser.
git clone https://github.com/elser-lang/elser-modeAdd this to your .emacs file:
(add-to-list 'load-path "~/path/to/elser-mode")
(autoload 'elser-mode "elser-mode" nil t)On top of Lisps's indentation rules Elser's major-mode follows the ideas of explicitness of mutative operations and enforced structure, thus it performs:
- Mutative and critical operations (e.g.
set!invoke!) highlighting withfont-lock-warning-faceto call attention to side‑effects. - Highlighting of structural keywords (e.g.
storage,functions). - Highlighting of supported types (e.g.
:i256,:addr).
For example, here's elser-mode manually applied to the buffer with initially enabled clojure-mode, to show how elser-mode differs in terms of highlighting critical operations:
