Skip to content

Instantly share code, notes, and snippets.

View tonini's full-sized avatar
💭
I may be slow to respond.

Samuel Tonini tonini

💭
I may be slow to respond.
View GitHub Profile
@tonini
tonini / hello
Last active August 29, 2015 14:07
Greetings
# Mr Hacker
I'm just a dude..

elixir-tooling.el

elixir-tooling.el is a package which brings the elixir tools to emacs (mix, hex, elixir, elixirc, iex)

compilation-mode.el

define the custom compilation mode

mix.el

everything about running mix task

;;; 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)