Now that we are loading package autoloads files (as part of the generated doom-package-autoload-file when running make autoloads), many :commands properties are redundant. In fact, many def-package! blocks are redundant. In some cases, we can do without a config.el file entirely, and can move into the autoloads file or rely entirely on package autoloads. Also, many settings have been moved in their module's autoloads files, which makes them available ASAP; their use no longer depends on module load order. This gained me a modest ~10% boost in startup speed.
27 lines
790 B
EmacsLisp
27 lines
790 B
EmacsLisp
;;; private/erlang/config.el -*- lexical-binding: t; -*-
|
|
|
|
(dolist (regexp '("\\.erlang$"
|
|
;; rebar files
|
|
"/rebar\\.config\\(?:\\.script\\)?$"
|
|
;; erlang configs
|
|
"/\\(?:app\\|sys\\)\\.config$"))
|
|
(map-put auto-mode-alist regexp 'erlang-mode))
|
|
|
|
|
|
(def-package! flycheck-rebar3
|
|
:when (featurep! :feature syntax-checker)
|
|
:after flycheck
|
|
:config (flycheck-rebar3-setup))
|
|
|
|
|
|
(def-package! ivy-erlang-complete
|
|
: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)))
|
|
|
|
|
|
(def-package! company-erlang
|
|
:when (featurep! :completion company)
|
|
:hook (erlang-mode . company-erlang-init))
|