This is an emacs major mode for the Eiffel programming language based on tree-sitter.
For the previous eiffel-mode without tree-sitter support see https://github.com/jonhermansen/eiffel-mode.
Code highlight | Automatic indentation |
This package requires Emacs 29 built with tree-sitter support.
To check if your Emacs has tree-sitter support check
(treesit-available-p)
This package does not automatically install the grammar yet.
A compatible tree-sitter Eiffel grammar is available at
https://github.com/imustafin/tree-sitter-eiffel. The compatible version is
v1.0.0
.
Emacs will look for the compiled grammar in the following paths:
- first, in the list of directories specified by the variable
treesit-extra-load-path
;- then, in the
tree-sitter
subdirectory of the directory specified byuser-emacs-directory
(see The Init File);- and finally, in the system’s default locations for dynamic libraries. https://www.gnu.org/software/emacs/manual/html_node/elisp/Language-Grammar.html
The user-emacs-directory
is ~/.emacs.d
by default, so putting
libtree-sitter-eiffel.so
in ~/.emacs.d/tree-sitter/
is enough.
This package is not available in any package archives yet.
You can run the following to install the package:
(package-vc-install "https://github.com/imustafin/eiffel-ts-mode")
You can clone the repository, add its path to load-path
and
evaluate eiffel-ts-mode.el
.
Assuming you are in the home directory:
git clone https://github.com/imustafin/eiffel-ts-mode.git
Execute
(add-to-list 'load-path "~/eiffel-ts-mode/")
And execute eiffel-ts-mode.el
.
This repository includes the eiffel
layer definition in the eiffel
folder.
To use it:
- Add the path of this repository to
dotspacemacs-configuration-layer-path
(Not theeiffel/
directory) - Add
eiffel
todotspacemacs-additional-packages
Also check the eiffel/README.org