2019-03-02 01:56:32 -05:00
|
|
|
;;; lang/erlang/config.el -*- lexical-binding: t; -*-
|
2018-03-29 16:18:57 -05:00
|
|
|
|
2019-07-23 12:44:03 +02:00
|
|
|
(use-package! erlang
|
2019-09-13 21:59:03 -04:00
|
|
|
:mode ("\\.erlang\\'" . erlang-mode)
|
|
|
|
:mode ("/rebar\\.config\\(?:\\.script\\)?\\'" . erlang-mode)
|
|
|
|
:mode ("/\\(?:app\\|sys\\)\\.config\\'" . erlang-mode))
|
2018-05-25 00:46:11 +02:00
|
|
|
|
2018-03-29 16:18:57 -05:00
|
|
|
|
2019-07-23 12:44:03 +02:00
|
|
|
(use-package! flycheck-rebar3
|
2020-01-14 03:04:26 -05:00
|
|
|
:when (featurep! :checkers syntax)
|
2018-05-25 00:46:11 +02:00
|
|
|
:after flycheck
|
|
|
|
:config (flycheck-rebar3-setup))
|
|
|
|
|
2018-03-29 16:18:57 -05:00
|
|
|
|
2019-07-23 12:44:03 +02:00
|
|
|
(use-package! ivy-erlang-complete
|
2018-03-29 16:18:57 -05:00
|
|
|
:when (featurep! :completion ivy)
|
|
|
|
:hook (erlang-mode . ivy-erlang-complete-init)
|
|
|
|
:config
|
|
|
|
(add-hook! 'erlang-mode-hook
|
|
|
|
(add-hook 'after-save-hook #'ivy-erlang-complete-reparse nil t)))
|
|
|
|
|
|
|
|
|
2019-07-23 12:44:03 +02:00
|
|
|
(use-package! company-erlang
|
2018-03-29 16:18:57 -05:00
|
|
|
:when (featurep! :completion company)
|
2020-01-14 14:18:52 -05:00
|
|
|
:unless (featurep! +lsp)
|
2018-03-29 16:18:57 -05:00
|
|
|
:hook (erlang-mode . company-erlang-init))
|
2020-01-14 14:18:52 -05:00
|
|
|
|
|
|
|
(when (featurep! +lsp)
|
2020-01-14 19:09:38 -05:00
|
|
|
(add-hook 'erlang-mode-local-vars-hook #'lsp!))
|