prettify stuff for javascript and git stuff

This commit is contained in:
Simo-Pekka Kerkelä 2015-09-01 17:34:44 +03:00
parent e74196e49d
commit 038918392f

View file

@ -27,6 +27,7 @@
js2-mode js2-mode
ac-js2 ac-js2
json-mode json-mode
skewer-mode
flycheck flycheck
web-mode web-mode
git git
@ -151,6 +152,9 @@
(require 'powerline) (require 'powerline)
(require 'git) (require 'git)
(require 'icicles) (require 'icicles)
(require 'git)
(powerline-center-evil-theme) (powerline-center-evil-theme)
(add-hook 'after-init-hook #'global-flycheck-mode) (add-hook 'after-init-hook #'global-flycheck-mode)
@ -166,6 +170,8 @@
'(json-jsonlist))) '(json-jsonlist)))
(when (memq window-system '(mac ns)) (when (memq window-system '(mac ns))
(let ((default-directory "/usr/local/share/emacs/site-lisp/"))
(normal-top-level-add-subdirs-to-load-path))
(exec-path-from-shell-initialize)) (exec-path-from-shell-initialize))
;; indent settings for web mode ;; indent settings for web mode
@ -174,7 +180,20 @@
(setq web-mode-css-indent-offset 2) (setq web-mode-css-indent-offset 2)
(setq web-mode-code-indent-offset 2)) (setq web-mode-code-indent-offset 2))
(global-prettify-symbols-mode 1)
(add-hook 'web-mode-hook 'my-web-mode-hook) (add-hook 'web-mode-hook 'my-web-mode-hook)
(add-hook 'js2-mode-hook
(lambda ()
(push '("function" . )
prettify-symbols-alist)
(push '("const" . ?\u2201)
prettify-symbols-alist)
(push '("=>" . ?\u21d2)
prettify-symbols-alist)
(push '("return" . ?\u279C)
prettify-symbols-alist)))
(setq web-mode-content-types-alist (setq web-mode-content-types-alist
'(("jsx" . "\\.js[x]?\\'"))) '(("jsx" . "\\.js[x]?\\'")))