forked from alienrobotwizard/emacs-starter-kit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
starter-kit-js.el
30 lines (27 loc) · 1.31 KB
/
starter-kit-js.el
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
;;; starter-kit-js.el --- Some helpful Javascript helpers
;;
;; Part of the Emacs Starter Kit
(autoload 'espresso-mode "espresso" "Start espresso-mode" t)
(add-to-list 'auto-mode-alist '("\\.js$" . espresso-mode))
(add-to-list 'auto-mode-alist '("\\.json$" . espresso-mode))
;; (add-hook 'espresso-mode-hook 'moz-minor-mode)
;; (add-hook 'espresso-mode-hook 'esk-paredit-nonlisp)
(add-hook 'espresso-mode-hook 'run-coding-hook)
(add-hook 'espresso-mode-hook 'idle-highlight)
(setq espresso-indent-level 2)
(eval-after-load 'espresso
'(progn
;; (define-key espresso-mode-map "{" 'paredit-open-brace)
;; (define-key espresso-mode-map "}" 'paredit-close-brace-and-newline)
;; fixes problem with pretty function font-lock
(define-key espresso-mode-map (kbd ",") 'self-insert-command)
(font-lock-add-keywords 'espresso-mode
'(("\\<\\(FIX\\|TODO\\|FIXME\\|HACK\\|REFACTOR\\):"
1 font-lock-warning-face t)))
(font-lock-add-keywords
'espresso-mode `(("\\(function *\\)("
(0 (progn (compose-region (match-beginning 1)
(match-end 1) "ƒ")
nil)))))))
(provide 'starter-kit-js)
;;; starter-kit-js.el ends here