Created
July 13, 2014 13:25
-
-
Save cabo/e32c74d73e98d4b08451 to your computer and use it in GitHub Desktop.
Emacs lisp snippet to turn Elixir into a charming language (during editing only)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defconst elixir--cabo-prettify-symbols-alist | |
'( | |
("->" . ?➙) ; → ➜➽➤ | |
("::" . ?∷) | |
("<-" . ?⬅) ; ← | |
("<<" . ?⟪ ) ; «≪ | |
("=>" . ?⇒) | |
(">>" . ?⟫ ) ; »≫ | |
("do" . ?⫷) | |
("do:" . ?⨸) ; ❢ ⋮ ⪓ ⪣ ⫶ ⧴ ⧔ ⋮ ÷ ≑ ≕ ⊰ ⨷ ⧥ ⨸ | |
("end" . ?⫸) | |
("fn" . ?Ƒ) ; ?λ⩹ | |
("for" . ?∀) | |
("when" . ?⨇) ; ⫿ ⎮∣ ⫼ | |
("|>" . ?⩥) ; ➤➧➲➽⇛⇥⇶⇉⇢➾☞ | |
)) | |
(defun elixir-cabo () | |
(setq-local prettify-symbols-alist elixir--cabo-prettify-symbols-alist) | |
(prettify-symbols-mode 1)) | |
(add-hook 'elixir-mode-hook 'elixir-cabo) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment