Files
doomemacs/modules/lang/erlang/config.el
2025-08-27 17:29:58 +02:00

21 lines
647 B
EmacsLisp

;;; lang/erlang/config.el -*- lexical-binding: t; -*-
(use-package! erlang
:mode ("\\.erlang\\'" . erlang-mode)
:mode ("/rebar\\.config\\(?:\\.script\\)?\\'" . erlang-mode)
:mode ("/\\(?:app\\|sys\\)\\.config\\'" . erlang-mode)
:config
(set-formatter! 'erlfmt '("rebar3" "fmt" "-")
:modes '(erlang-mode erlang-ts-mode))
(when (modulep! +lsp)
(add-hook 'erlang-mode-local-vars-hook #'lsp! 'append)))
(use-package! erlang-ts
:when (modulep! +tree-sitter)
:when (fboundp 'erlang-ts-mode)
:defer t
:init
(set-tree-sitter! 'erlang-mode 'erlang-ts-mode
'((erlang "https://github.com/WhatsApp/tree-sitter-erlang"))))