https://github.com/erlang/emacs-erlang-ts
Emacs Erlang mode using tree-sitter
https://github.com/erlang/emacs-erlang-ts
Last synced: 10 months ago
JSON representation
Emacs Erlang mode using tree-sitter
- Host: GitHub
- URL: https://github.com/erlang/emacs-erlang-ts
- Owner: erlang
- License: apache-2.0
- Created: 2025-01-09T14:07:49.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-10T07:27:33.000Z (over 1 year ago)
- Last Synced: 2025-05-07T23:44:22.578Z (about 1 year ago)
- Language: Emacs Lisp
- Size: 19.5 KB
- Stars: 11
- Watchers: 7
- Forks: 5
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Emacs Erlang mode using treesitter #
Requires emacs-29 compiled with treesitter support.
Currently uses treesitter only for syntax-highlighting, *font-lock-mode*, and uses the old
erlang-mode for everything else.
There is a lot of work to do to convert the old erlang mode to use treesitter, but
by re-using the old one we can do the conversion little by little.
Help is appreciated.
# Install #
Add to your .emacs file:
```
(add-to-list 'load-path "~/emacs-erlang-ts")
(add-to-list 'treesit-language-source-alist '(erlang "https://github.com/WhatsApp/tree-sitter-erlang"))
(use-package erlang-ts
:mode ("\\.erl\\'" . erlang-ts-mode)
:defer 't)
```
Install/compile erlang treesitter support (first time only):
```
M-x treesit-install-language-grammar
Language: erlang
```
# Customization #
Customize `treesit-font-lock-level` variable to increase/decrease the coloring,
or use `M-x erlang-font-lock-level-1-4` to change it.