2015-06-09 03:26:56 +00:00
|
|
|
;;; packages.el --- Elixir Layer packages File for Spacemacs
|
2015-01-14 04:12:56 +00:00
|
|
|
;;
|
|
|
|
;; Copyright (c) 2012-2014 Sylvain Benner
|
|
|
|
;; Copyright (c) 2014-2015 Sylvain Benner & Contributors
|
|
|
|
;;
|
|
|
|
;; Author: Sylvain Benner <sylvain.benner@gmail.com>
|
|
|
|
;; URL: https://github.com/syl20bnr/spacemacs
|
|
|
|
;;
|
|
|
|
;; This file is not part of GNU Emacs.
|
|
|
|
;;
|
|
|
|
;;; License: GPLv3
|
|
|
|
|
2015-06-09 03:26:56 +00:00
|
|
|
(setq elixir-packages
|
2014-11-29 04:59:23 +00:00
|
|
|
'(
|
2015-01-20 22:28:32 +00:00
|
|
|
alchemist
|
2015-06-09 03:28:27 +00:00
|
|
|
company
|
2014-11-29 04:59:23 +00:00
|
|
|
elixir-mode
|
|
|
|
flycheck
|
2015-05-28 14:01:09 +00:00
|
|
|
popwin
|
2014-11-29 04:59:23 +00:00
|
|
|
ruby-end
|
2015-04-19 03:40:24 +00:00
|
|
|
))
|
2014-11-29 04:59:23 +00:00
|
|
|
|
2015-06-09 03:26:56 +00:00
|
|
|
(defun elixir/init-alchemist ()
|
2015-06-09 03:28:27 +00:00
|
|
|
(use-package alchemist
|
|
|
|
:defer t
|
|
|
|
:init
|
|
|
|
(progn
|
|
|
|
(add-hook 'elixir-mode-hook 'alchemist-mode)
|
|
|
|
(setq alchemist-project-compile-when-needed t)
|
|
|
|
(push 'alchemist-company company-backends-elixir-mode))
|
|
|
|
:config
|
|
|
|
(evil-leader/set-key-for-mode 'elixir-mode
|
|
|
|
"mel" 'alchemist-eval-current-line
|
|
|
|
"meL" 'alchemist-eval-print-current-line
|
|
|
|
"mer" 'alchemist-eval-region
|
|
|
|
"meR" 'alchemist-eval-print-region
|
|
|
|
"meb" 'alchemist-eval-buffer
|
|
|
|
"meB" 'alchemist-eval-print-buffer
|
|
|
|
"mej" 'alchemist-eval-quoted-current-line
|
|
|
|
"meJ" 'alchemist-eval-print-quoted-current-line
|
|
|
|
"meu" 'alchemist-eval-quoted-region
|
|
|
|
"meU" 'alchemist-eval-print-quoted-region
|
|
|
|
"mev" 'alchemist-eval-quoted-buffer
|
|
|
|
"meV" 'alchemist-eval-print-quoted-buffer
|
|
|
|
|
|
|
|
"mpt" 'alchemist-project-find-test
|
|
|
|
"mgt" 'alchemist-project-toggle-file-and-tests
|
|
|
|
"mgT" 'alchemist-project-toggle-file-and-tests-other-window
|
2015-02-18 03:11:41 +00:00
|
|
|
|
2015-06-09 03:28:27 +00:00
|
|
|
"mh:" 'alchemist-help
|
|
|
|
"mhH" 'alchemist-help-history
|
|
|
|
"mhh" 'alchemist-help-search-at-point
|
|
|
|
"mhr" 'alchemist-help-search-marked-region
|
2015-02-18 03:11:41 +00:00
|
|
|
|
2015-06-09 03:28:27 +00:00
|
|
|
"mm:" 'alchemist-mix
|
|
|
|
"mmc" 'alchemist-mix-compile
|
|
|
|
"mmx" 'alchemist-mix-run
|
|
|
|
"mmh" 'alchemist-mix-help
|
2015-02-18 03:11:41 +00:00
|
|
|
|
2015-06-09 03:28:27 +00:00
|
|
|
"msi" 'alchemist-iex-run
|
|
|
|
"msI" 'alchemist-iex-project-run
|
|
|
|
"msl" 'alchemist-iex-send-current-line
|
|
|
|
"msL" 'alchemist-iex-send-current-line-and-go
|
|
|
|
"msr" 'alchemist-iex-send-region
|
|
|
|
"msR" 'alchemist-iex-send-region-and-go
|
|
|
|
"msc" 'alchemist-iex-compile-this-buffer
|
2015-02-18 03:11:41 +00:00
|
|
|
|
2015-06-09 03:28:27 +00:00
|
|
|
"mta" 'alchemist-mix-test
|
|
|
|
"mtb" 'alchemist-mix-test-this-buffer
|
|
|
|
"mtt" 'alchemist-mix-test-at-point
|
|
|
|
"mtf" 'alchemist-test-file
|
|
|
|
"mtn" 'alchemist-test-jump-to-next-test
|
|
|
|
"mtp" 'alchemist-test-jump-to-previous-test
|
2015-02-18 03:11:41 +00:00
|
|
|
|
2015-06-09 03:28:27 +00:00
|
|
|
"mxb" 'alchemist-execute-this-buffer
|
|
|
|
"mxf" 'alchemist-execute-file
|
|
|
|
"mx:" 'alchemist-execute
|
2015-02-18 03:11:41 +00:00
|
|
|
|
2015-06-09 03:28:27 +00:00
|
|
|
"mcb" 'alchemist-compile-this-buffer
|
|
|
|
"mcf" 'alchemist-compile-file
|
|
|
|
"mc:" 'alchemist-compile
|
2015-06-04 06:45:44 +00:00
|
|
|
|
2015-06-09 03:28:27 +00:00
|
|
|
"mgg" 'alchemist-goto-definition-at-point
|
|
|
|
"m," 'alchemist-goto-jump-back)))
|
2015-06-04 06:45:44 +00:00
|
|
|
|
2015-06-09 03:28:27 +00:00
|
|
|
(defun elixir/post-init-company ()
|
|
|
|
(spacemacs|add-company-hook elixir-mode))
|
2014-12-07 15:21:27 +00:00
|
|
|
|
2015-06-09 03:26:56 +00:00
|
|
|
(defun elixir/init-elixir-mode ()
|
|
|
|
(use-package elixir-mode
|
|
|
|
:defer t))
|
2014-12-07 15:21:27 +00:00
|
|
|
|
2015-06-09 03:26:56 +00:00
|
|
|
(defun elixir/post-init-flycheck ()
|
|
|
|
(add-hook 'elixir-mode-hook 'flycheck-mode))
|
2014-12-07 15:21:27 +00:00
|
|
|
|
2015-05-28 14:01:09 +00:00
|
|
|
(defun elixir/post-init-popwin ()
|
|
|
|
(spacemacs|use-package-add-hook popwin
|
|
|
|
:post-config
|
|
|
|
(push '("*mix*" :tail t :noselect t) popwin:special-display-config)))
|
|
|
|
|
2015-06-09 03:26:56 +00:00
|
|
|
(defun elixir/init-ruby-end ()
|
|
|
|
(use-package ruby-end
|
2014-11-29 04:59:23 +00:00
|
|
|
:defer t
|
2015-06-09 03:26:56 +00:00
|
|
|
:init
|
2014-11-29 04:59:23 +00:00
|
|
|
(progn
|
2015-06-09 03:26:56 +00:00
|
|
|
(defun spacemacs//ruby-end ()
|
2015-02-20 12:29:24 +00:00
|
|
|
(set (make-variable-buffer-local 'ruby-end-expand-keywords-before-re)
|
|
|
|
"\\(?:^\\|\\s-+\\)\\(?:do\\)")
|
|
|
|
(set (make-variable-buffer-local 'ruby-end-check-statement-modifiers)
|
|
|
|
nil)
|
|
|
|
(ruby-end-mode +1))
|
2015-06-09 03:26:56 +00:00
|
|
|
(add-hook 'elixir-mode-hook 'spacemacs//ruby-end))
|
2015-02-20 12:29:24 +00:00
|
|
|
:config
|
|
|
|
(progn
|
|
|
|
(spacemacs|hide-lighter ruby-end-mode)
|
|
|
|
;; hack to remove the autoloaded `add-hook' in `ruby-end'
|
|
|
|
(remove-hook 'ruby-mode-hook 'ruby-end-mode)
|
|
|
|
(remove-hook 'enh-ruby-mode-hook 'ruby-end-mode))))
|