js.el 737 B

123456789101112131415161718192021222324
  1. (setq wi-js--prettify-symbols-alist
  2. `(("!" . ?¬)
  3. ("!!" . ,(string-to-symbols "Boolean $ ")) ;Haskell like notation
  4. ("!=" . ?≠)
  5. ("!==" . ?≠)
  6. ("===" . ?≡)
  7. ("&&" . ?∧)
  8. ("||" . ?∨)
  9. ("<=" . ?≤)
  10. (">=" . ?≥)
  11. (";" . ,(string-to-symbols " "))
  12. ("null" . ?N)
  13. ("false" . ?F)
  14. ("true" . ?T)
  15. ("=>" . ?→)
  16. ("const" . ,(string-to-symbols "constant"))
  17. ("instanceof" . ,(string-to-symbols "instance of"))))
  18. (add-hook 'js-mode-hook 'prettify-symbols-mode)
  19. (add-hook 'js-mode-hook
  20. (lambda ()
  21. (set (make-local-variable 'prettify-symbols-alist)
  22. wi-js--prettify-symbols-alist)))