2015-06-09 03:26:56 +00:00
|
|
|
;;; packages.el --- Erlang Layer packages File for Spacemacs
|
|
|
|
;;
|
2021-03-22 20:11:29 +00:00
|
|
|
;; Copyright (c) 2012-2021 Sylvain Benner & Contributors
|
2015-06-09 03:26:56 +00:00
|
|
|
;;
|
|
|
|
;; Author: Sylvain Benner <sylvain.benner@gmail.com>
|
|
|
|
;; URL: https://github.com/syl20bnr/spacemacs
|
|
|
|
;;
|
|
|
|
;; This file is not part of GNU Emacs.
|
|
|
|
;;
|
2021-03-24 03:31:44 +00:00
|
|
|
;; This program is free software; you can redistribute it and/or modify
|
|
|
|
;; it under the terms of the GNU General Public License as published by
|
|
|
|
;; the Free Software Foundation, either version 3 of the License, or
|
|
|
|
;; (at your option) any later version.
|
|
|
|
;;
|
|
|
|
;; This program is distributed in the hope that it will be useful,
|
|
|
|
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
;; GNU General Public License for more details.
|
|
|
|
;;
|
|
|
|
;; You should have received a copy of the GNU General Public License
|
|
|
|
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
2015-06-09 03:26:56 +00:00
|
|
|
|
|
|
|
(setq erlang-packages
|
2018-11-20 19:55:37 +00:00
|
|
|
'(
|
|
|
|
company
|
|
|
|
erlang
|
2021-08-20 03:15:41 +00:00
|
|
|
dap-mode
|
2018-11-20 19:55:37 +00:00
|
|
|
ggtags
|
|
|
|
counsel-gtags
|
|
|
|
helm-gtags
|
2021-04-17 07:15:22 +00:00
|
|
|
flycheck))
|
|
|
|
|
2015-06-09 03:26:56 +00:00
|
|
|
|
|
|
|
(defun erlang/post-init-company ()
|
2020-10-07 21:51:33 +00:00
|
|
|
;; backend specific
|
2021-04-17 07:15:22 +00:00
|
|
|
(add-hook 'erlang-mode-local-vars-hook #'spacemacs//erlang-setup-company))
|
2015-06-09 03:26:56 +00:00
|
|
|
|
|
|
|
(defun erlang/init-erlang ()
|
|
|
|
(use-package erlang
|
2018-03-04 04:37:53 +00:00
|
|
|
:defer t
|
2021-04-17 07:15:22 +00:00
|
|
|
;; explicitly run prog-mode hooks since erlang mode does is not
|
|
|
|
;; derived from prog-mode major-mode
|
2021-04-28 14:31:59 +00:00
|
|
|
:hook (erlang-mode . spacemacs/run-prog-mode-hooks)
|
2021-04-17 07:15:22 +00:00
|
|
|
(erlang-mode . spacemacs//erlang-default)
|
|
|
|
(erlang-mode-local-vars . spacemacs//erlang-setup-backend)
|
2015-06-09 03:26:56 +00:00
|
|
|
:init
|
|
|
|
(progn
|
|
|
|
;; (setq erlang-root-dir "/usr/lib/erlang/erts-5.10.3")
|
|
|
|
;; (add-to-list 'exec-path "/usr/lib/erlang/erts-5.10.3/bin")
|
|
|
|
;; (setq erlang-man-root-dir "/usr/lib/erlang/erts-5.10.3/man")
|
|
|
|
;; (add-hook 'erlang-mode-hook
|
|
|
|
;; (lambda ()
|
|
|
|
;; (setq mode-name "Erlang")
|
|
|
|
;; ;; when starting an Erlang shell in Emacs, with a custom node name
|
|
|
|
;; (setq inferior-erlang-machine-options '("-sname" "syl20bnr"))
|
|
|
|
;; ))
|
|
|
|
(setq erlang-compile-extra-opts '(debug_info)))
|
2020-10-07 21:51:33 +00:00
|
|
|
:config (require 'erlang-start)))
|
2015-06-09 03:26:56 +00:00
|
|
|
|
2021-08-20 03:15:41 +00:00
|
|
|
(defun erlang/pre-init-dap-mode ()
|
|
|
|
(add-hook 'erlang-mode-local-vars-hook #'spacemacs//erlang-setup-dap))
|
|
|
|
|
2015-06-09 03:26:56 +00:00
|
|
|
(defun erlang/post-init-flycheck ()
|
2017-02-14 03:27:29 +00:00
|
|
|
(spacemacs/enable-flycheck 'erlang-mode))
|
2016-04-05 04:08:34 +00:00
|
|
|
|
|
|
|
(defun erlang/post-init-ggtags ()
|
2016-08-15 19:24:44 +00:00
|
|
|
(add-hook 'erlang-mode-local-vars-hook #'spacemacs/ggtags-mode-enable))
|
2016-04-05 04:08:34 +00:00
|
|
|
|
2017-08-26 21:18:09 +00:00
|
|
|
(defun erlang/post-init-counsel-gtags ()
|
|
|
|
(spacemacs/counsel-gtags-define-keys-for-mode 'erlang-mode))
|
|
|
|
|
2016-04-05 04:08:34 +00:00
|
|
|
(defun erlang/post-init-helm-gtags ()
|
|
|
|
(spacemacs/helm-gtags-define-keys-for-mode 'erlang-mode))
|