Here is what I use
(use-package editorconfig) (use-package prog-mode :init (defun mah/setup-prettify () "Called when mode is activated." ;; specify font for all unicode characters (when (member "Symbola" (font-family-list)) (set-fontset-font t 'symbol "Symbola") (set-fontset-font t 'greek "Go Mono")) (mapcar (lambda (x) (push x prettify-symbols-alist)) '(("<=" . ?≤) (">=" . ?≥) ("->" . ?→) ("!==" . ?≢) ("==" . ?≅) ("===" . ?≡) ("lambda" . ?λ) ("=>" . ?⇒) ("!=" . ?≠) ("nil" . ?∅)))) :hook ((prog-mode . prettify-symbols-mode) (prog-mode . editorconfig-mode) (prog-mode . mah/setup-prettify)))
(Well, ok, I use prettify, too, so if you don't like having Unicode equivalents to those operators, you can ignore that part.)
(Here's a question: why do are tabs set to 4 spaces in the editor here, but when they're displayed in the pre, they are eight?)