-
-
Save zenlor/38d21eabfddd1c5fb8606bdafed66cb2 to your computer and use it in GitHub Desktop.
Revisions
-
Kenny Foner revised this gist
Jul 7, 2016 . 1 changed file with 158 additions and 185 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -2,193 +2,166 @@ (defun setup-pragmata-ligatures () (setq prettify-symbols-alist (append prettify-symbols-alist '(("!!" . ?) ("!=" . ?) ("!==" . ?) ("!≡" . ?) ("!≡≡" . ?) ("!>" . ?) ("#(" . ?) ("#_" . ?) ("#{" . ?) ("#?" . ?) ("#>" . ?) ("%=" . ?) ("%>" . ?) ("<~" . ?) ("&%" . ?) ("&&" . ?) ("&*" . ?) ("&+" . ?) ("&-" . ?) ("&/" . ?) ("&=" . ?) ("&&&" . ?) ("&>" . ?) ("$>" . ?) ("~>" . ?) ;; ("***" . ?) ; I prefer not to use this one ("*=" . ?) ("*/" . ?) ("*>" . ?) ("++" . ?) ("+++" . ?) ("+=" . ?) ("+>" . ?) ("--" . ?) ("-<" . ?) ("-<<" . ?) ("-=" . ?) ("->>" . ?) ("---" . ?) ("-->" . ?) (".." . ?) ("..." . ?) ("..<" . ?) (".>" . ?) (".~" . ?) (".=" . ?) ("/*" . ?) ("//" . ?) ("/>" . ?) ("/=" . ?) ("/==" . ?) ("///" . ?) ("/**" . ?) ("::" . ?) (":=" . ?) (":≡" . ?) (":>" . ?) (":=>" . ?) ("<$>" . ?) ("<*" . ?) ("<*>" . ?) ("<+>" . ?) ;; ("<-" . ?) ; I like different arrows (see below) ("<<" . ?) ("<<<" . ?) ("<<=" . ?) ("<=" . ?) ;; ("<=>" . ?) ; I like different arrows (see below) ("<>" . ?) ("<|>" . ?) ("<<-" . ?) ("<|" . ?) ("<=<" . ?) ("<~~" . ?) ("<<~" . ?) ("<$" . ?) ("<+" . ?) ("<!>" . ?) ("<@>" . ?) ("<#>" . ?) ("<%>" . ?) ("<^>" . ?) ("<&>" . ?) ("<?>" . ?) ("<.>" . ?) ("</>" . ?) ("<\>" . ?) ("<\">" . ?) ("<:>" . ?) ("<~>" . ?) ("<**>" . ?) ("<<^" . ?) ("<!" . ?) ("<@" . ?) ("<#" . ?) ("<%" . ?) ("<^" . ?) ("<&" . ?) ("<?" . ?) ("<." . ?) ("</" . ?) ("<\\" . ?) ("<\"" . ?) ("<:" . ?) ("<->" . ?) ("<!--" . ?) ("<--" . ?) ("=<<" . ?) ("==" . ?) ("===" . ?) ;; ("==>" . ?) ; I like different arrows (see below) ;; ("=>" . ?) ; I like different arrows (see below) ("=~" . ?) ("=>>" . ?) ("≡≡" . ?) ("≡≡≡" . ?) ("≡:≡" . ?) (">-" . ?) (">=" . ?) (">>" . ?) (">>-" . ?) (">>=" . ?) (">>>" . ?) (">=>" . ?) (">>^" . ?) ("??" . ?) ("?~" . ?) ("?=" . ?) ("?>" . ?) ("^=" . ?) ("^." . ?) ("^?" . ?) ("^.." . ?) ("^<<" . ?) ("^>>" . ?) ("^>" . ?) ("\\\\" . ?) ("\\>" . ?) ("@>" . ?) ("|=" . ?) ("||" . ?) ("|>" . ?) ("|||" . ?) ("|+|" . ?) ("~=" . ?) ("~~>" . ?) ("~>>" . ?) ;; Personal preference: I like this set of arrows better than default ("<-" . ?🡐) ("->" . ?🡒) ("=>" . ?⇒) ("<=>" . ?⟺) ("<==>" . ?⟺) ("==>" . ?⟹) ("<==" . ?⟸) ("|->" . ?⟼) ("<-|" . ?⟻) ("|=>" . ?⟾) ("<=|" . ?⟽) )))) (defun refresh-pretty () -
Kenny Foner created this gist
Jul 7, 2016 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,203 @@ ;; PRETTIFY SYMBOLS (with Pragmata Pro) (defun setup-pragmata-ligatures () (setq prettify-symbols-alist (append prettify-symbols-alist '(;; U+E720 ("!!" . #xE720) ("!=" . #xE721) ("!==" . #xE722) ("!≡" . #xE724) ("!≡≡" . #xE725) ("!>" . #xE726) ;; U+E740 ("#(" . #xE740) ("#_" . #xE741) ("#{" . #xE742) ("#?" . #xE743) ("#>" . #xE744) ;; U+E750 ("%=" . #xE750) ("%>" . #xE751) ("<~" . #xE75F) ;; U+E760 ("&%" . #xE760) ("&&" . #xE761) ("&*" . #xE762) ("&+" . #xE763) ("&-" . #xE764) ("&/" . #xE765) ("&=" . #xE766) ("&&&" . #xE767) ("&>" . #xE768) ;; U+E770 ("$>" . #xE775) ("~>" . #xE77F) ;; U+E780 ;; ("***" . #xE780) ; I prefer not to use this one ("*=" . #xE781) ("*/" . #xE782) ("*>" . #xE783) ;; U+E790 ("++" . #xE790) ("+++" . #xE791) ("+=" . #xE792) ("+>" . #xE793) ;; U+E7A0 ("--" . #xE7A0) ("-<" . #xE7A1) ("-<<" . #xE7A2) ("-=" . #xE7A3) ;; ("->" . #xE7A4) ; I like different arrows (see below) ("->>" . #xE7A5) ("---" . #xE7A6) ("-->" . #xE7A7) ;; U+E7B0 (".." . #xE7B0) ("..." . #xE7B1) ("..<" . #xE7B2) (".>" . #xE7B3) (".~" . #xE7B4) (".=" . #xE7B5) ;; U+E7C0 ("/*" . #xE7C0) ("//" . #xE7C1) ("/>" . #xE7C2) ("/=" . #xE7C3) ("/==" . #xE7C4) ("///" . #xE7C5) ("/**" . #xE7C6) ;; U+E7D0 ("::" . #xE7D0) (":=" . #xE7D1) (":≡" . #xE7D2) (":>" . #xE7D3) (":=>" . #xE7D4) ;; U+E7E0 ("<$>" . #xE7E0) ("<*" . #xE7E1) ("<*>" . #xE7E2) ("<+>" . #xE7E3) ;; ("<-" . #xE7E4) ; I like different arrows (see below) ("<<" . #xE7E5) ("<<<" . #xE7E6) ("<<=" . #xE7E7) ("<=" . #xE7E8) ;; ("<=>" . #xE7E9) ; I like different arrows (see below) ("<>" . #xE7EA) ("<|>" . #xE7EB) ("<<-" . #xE7EC) ("<|" . #xE7ED) ("<=<" . #xE7EE) ;; ("<~" . #xE7EF) ; Duplicate of another ligature ;; U+E7F0 ("<~~" . #xE7F0) ("<<~" . #xE7F1) ("<$" . #xE7F2) ("<+" . #xE7F3) ("<!>" . #xE7F4) ("<@>" . #xE7F5) ("<#>" . #xE7F6) ("<%>" . #xE7F7) ("<^>" . #xE7F8) ("<&>" . #xE7F9) ("<?>" . #xE7FA) ("<.>" . #xE7FB) ("</>" . #xE7FC) ("<\>" . #xE7FD) ("<\">" . #xE7FE) ("<:>" . #xE7FF) ;; U+E800 <<^ ("<~>" . #xE800) ("<**>" . #xE801) ("<<^" . #xE802) ("<!" . #xE803) ("<@" . #xE804) ("<#" . #xE805) ("<%" . #xE806) ("<^" . #xE807) ("<&" . #xE808) ("<?" . #xE809) ("<." . #xE80A) ("</" . #xE80B) ("<\\" . #xE80C) ("<\"" . #xE80D) ("<:" . #xE80E) ("<->" . #xE80F) ;; U+E810 ("<!--" . #xE810) ("<--" . #xE811) ;; U+E820 ("=<<" . #xE820) ("==" . #xE821) ("===" . #xE822) ;; ("==>" . #xE823) ; I like different arrows (see below) ;; ("=>" . #xE824) ; I like different arrows (see below) ("=~" . #xE825) ("=>>" . #xE826) ;; U+E830 ("≡≡" . #xE830) ("≡≡≡" . #xE831) ("≡:≡" . #xE832) ;; U+E840 (">-" . #xE840) (">=" . #xE841) (">>" . #xE842) (">>-" . #xE843) (">>=" . #xE844) (">>>" . #xE845) (">=>" . #xE846) (">>^" . #xE847) ;; U+E860 ("??" . #xE860) ("?~" . #xE861) ("?=" . #xE862) ("?>" . #xE863) ;; unassigned, snip ("^=" . #xE868) ("^." . #xE869) ("^?" . #xE86A) ("^.." . #xE86B) ("^<<" . #xE86C) ("^>>" . #xE86D) ("^>" . #xE86E) ;; U+E870 ("\\\\" . #xE870) ("\\>" . #xE871) ;; unassigned snip ("@>" . #xE877) ;; U+E880 ("|=" . #xE880) ("||" . #xE881) ("|>" . #xE882) ("|||" . #xE883) ("|+|" . #xE884) ;; U+E890 ("~=" . #xE890) ;; ("~>" . #xE891) ; duplicate of another ligature ("~~>" . #xE892) ("~>>" . #xE893) ;; Personal preference: I like this set of arrows better than default ("<-" . #x1F850) ; 🡐 ("->" . #x1F852) ; 🡒 ("=>" . #x21D2) ; ⇒ ("<=>" . #x27FA) ; ⟺ ("<==>" . #x27FA) ; ⟺ ("==>" . #x27F9) ; ⟹ ("<==" . #x27F8) ; ⟸ ("|->" . #x27FC) ; ⟼ ("<-|" . #x27FB) ; ⟻ ("|=>" . #x27FE) ; ⟾ ("<=|" . #x27FD) ; ⟽ )))) (defun refresh-pretty () (prettify-symbols-mode -1) (prettify-symbols-mode +1)) ;; Hooks for modes in which to install the Pragmata ligatures (mapc (lambda (hook) (add-hook hook (lambda () (setup-pragmata-ligatures) (refresh-pretty)))) '(text-mode-hook prog-mode-hook)) (global-prettify-symbols-mode +1)