elixir-tooling.el is a package which brings the elixir tools to emacs (mix, hex, elixir, elixirc, iex)
define the custom compilation mode
everything about running mix task
# Mr Hacker | |
I'm just a dude.. |
;;; elixir-compile.el --- Elixir's compile integration | |
;;; Commentary: | |
;; | |
;;; Code: | |
(defcustom elixir-compile-command "elixirc" | |
"The shell command for elixirc." | |
:type 'string |
(defvar alchemist-mode-map | |
(let ((map (make-sparse-keymap))) | |
(define-key map "C-c a t" 'alchemist-mix-test) | |
map) | |
"The keymap used when `alchemist-mode' is active.") | |
;;;###autoload | |
(define-minor-mode alchemist-mode | |
"Toggle alchemist mode. |
(defvar alchemist-mode-map | |
(let ((map (make-sparse-keymap))) | |
(define-key map (kbd "C-c a t") 'alchemist-mix-test) | |
map) | |
"The keymap used when `alchemist-mode' is active.") | |
;;;###autoload | |
(define-minor-mode alchemist-mode | |
"Toggle alchemist mode. |
defmodule CljsRotor do | |
def cljs(files) do | |
files = Enum.map files, fn(file)-> | |
absolute_path = Path.expand(file.path) | |
%{file | :contents => System.cmd("cljsc", [absolute_path])} | |
end | |
files | |
end | |
end |
(defun alchemist-on-save () | |
(when alchemist-test-on-save | |
(display-buffer alchemist-mix-buffer-name) | |
(alchemist-mix-test))) | |
(add-hook 'alchemist-mode | |
(lambda () | |
(add-hook 'after-save-hook 'alchemist-on-save nil t))) |
;; Taken from: http://www.emacswiki.org/emacs/TabCompletion#toc2 | |
(defun chrismccord-smart-tab () | |
"This smart tab is minibuffer compliant: it acts as usual in | |
the minibuffer. Else, if mark is active, indents region. Else if | |
point is at the end of a symbol, expands it. Else indents the | |
current line." | |
(interactive) | |
(if (minibufferp) | |
(unless (minibuffer-complete) | |
(dabbrev-expand nil)) |
package: | |
$(CASK) package | |
mkdir -p packages/$(PACKAGE_NAME) | |
+ cp cider-pkg.el packages/$(PACKAGE_NAME) | |
cp $(ELS) packages/$(PACKAGE_NAME) | |
tar cf packages/$(PACKAGE_NAME).tar -C packages $(PACKAGE_NAME) |
defmodule ElixirDoc do | |
require IEx.Helpers | |
def help(args) do | |
IEx.Helpers.h(args) | |
end | |
end | |
ElixirDoc.help(IO) |