Merge pull request #497 from bitwalker/erlang-mode
Add language support for Erlang
This commit is contained in:
commit
2ea35c0175
3 changed files with 43 additions and 0 deletions
|
@ -65,6 +65,7 @@
|
||||||
clojure ; java with a lisp
|
clojure ; java with a lisp
|
||||||
csharp ; unity, .NET, and mono shenanigans
|
csharp ; unity, .NET, and mono shenanigans
|
||||||
data ; config/data formats
|
data ; config/data formats
|
||||||
|
;erlang ; an elegant language for a more civilized age
|
||||||
elixir ; erlang done right
|
elixir ; erlang done right
|
||||||
elm ; care for a cup of TEA?
|
elm ; care for a cup of TEA?
|
||||||
emacs-lisp ; drown in parentheses
|
emacs-lisp ; drown in parentheses
|
||||||
|
|
29
modules/lang/erlang/config.el
Normal file
29
modules/lang/erlang/config.el
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
;;; private/erlang/config.el -*- lexical-binding: t; -*-
|
||||||
|
|
||||||
|
(def-package! erlang
|
||||||
|
;; customizations
|
||||||
|
:mode "\\.erlang$"
|
||||||
|
;; rebar files
|
||||||
|
:mode "/rebar\\.config\\(?:\\.script\\)?$"
|
||||||
|
;; erlang configs
|
||||||
|
:mode "/\\(?:app\\|sys\\)\\.config$")
|
||||||
|
|
||||||
|
(def-package! flycheck-rebar3
|
||||||
|
:when (featurep! :feature syntax-checker)
|
||||||
|
:after erlang
|
||||||
|
:config
|
||||||
|
(flycheck-rebar3-setup))
|
||||||
|
|
||||||
|
;; Completion via Ivy
|
||||||
|
(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)))
|
||||||
|
|
||||||
|
|
||||||
|
;; Completion via Company
|
||||||
|
(def-package! company-erlang
|
||||||
|
:when (featurep! :completion company)
|
||||||
|
:hook (erlang-mode . company-erlang-init))
|
13
modules/lang/erlang/packages.el
Normal file
13
modules/lang/erlang/packages.el
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
;; -*- no-byte-compile: t; -*-
|
||||||
|
;;; private/erlang/packages.el
|
||||||
|
|
||||||
|
(package! erlang)
|
||||||
|
|
||||||
|
(when (featurep! :feature syntax-checker)
|
||||||
|
(package! flycheck-rebar3))
|
||||||
|
|
||||||
|
(when (featurep! :completion ivy)
|
||||||
|
(package! ivy-erlang-complete))
|
||||||
|
|
||||||
|
(when (featurep! :completion company)
|
||||||
|
(package! company-erlang))
|
Loading…
Add table
Add a link
Reference in a new issue