;;; ui/pretty-code/config.el -*- lexical-binding: t; -*- (defvar +pretty-code-symbols '(;; org :name "»" :src_block "»" :src_block_end "«" :quote "“" :quote_end "”" ;; Functional :lambda "λ" :def "ƒ" :composition "∘" :map "↦" ;; Types :null "∅" :true "𝕋" :false "𝔽" :int "ℤ" :float "ℝ" :str "𝕊" :bool "𝔹" ;; Flow :not "¬" :in "∈" :not-in "∉" :and "∧" :or "∨" :for "∀" :some "∃" :return "⟼" :yield "⟻" ;; Other :tuple "⨂" :pipe "" ;; FIXME: find a non-private char :dot "•") "Options plist for `set-pretty-symbols!'. This should not contain any symbols from the Unicode Private Area! There is no universal way of getting the correct symbol as that area varies from font to font.") (defvar +pretty-code-enabled-modes t "List of major modes in which `prettify-symbols-mode' should be enabled. If t, enable it everywhere. If the first element is 'not, enable it in any mode besides what is listed.") (defvar +pretty-code-symbols-alist '((t)) "An alist containing a mapping of major modes to its value for `prettify-symbols-alist'.") ;;; Automatic font-specific ligatures (defvar +prog-ligatures-alist (eval-when-compile `((?! . ,(regexp-opt '("!!" "!=" "!=="))) (?# . ,(regexp-opt '("##" "###" "####" "#(" "#:" "#=" "#?" "#[" "#_" "#_(" "#{"))) (?$ . ,(regexp-opt '("$>" "$>>"))) (?% . ,(regexp-opt '("%%" "%%%"))) (?& . ,(regexp-opt '("&&" "&&&"))) (?* . ,(regexp-opt '("*" "**" "***" "**/" "*/" "*>"))) (?+ . ,(regexp-opt '("+" "++" "+++" "+>"))) (?- . ,(regexp-opt '("--" "---" "-->" "-<" "-<<" "->" "->>" "-}" "-~"))) (?. . ,(regexp-opt '(".-" ".." "..." "..<" ".="))) (?/ . ,(regexp-opt '("/*" "/**" "//" "///" "/=" "/==" "/>"))) (?: . ,(regexp-opt '(":" "::" ":::" ":=" ":<" ":=" ":>"))) (?0 . "0\\(?:\\(x[a-fA-F0-9]\\).?\\)") ; Tries to match the x in 0xDEADBEEF ;; (?x . ,(regexp-opt '("x"))) ; Also tries to match the x in 0xDEADBEEF (?\; . ,(regexp-opt '(";;"))) (?< . ,(regexp-opt '("