1
0
Fork 0

Clean up emacs init

This commit is contained in:
Jeremy Kaplan 2016-07-06 17:35:26 -04:00
commit e457c040fa

View file

@ -14,11 +14,11 @@
go-mode go-mode
goto-chg goto-chg
haskell-mode haskell-mode
jinja2-mode jsx-mode
js2-mode
markdown-mode markdown-mode
php-mode php-mode
scala-mode scala-mode
tuareg
typescript-mode typescript-mode
undo-tree undo-tree
web-mode web-mode
@ -98,7 +98,7 @@
;; If you edit it by hand, you could mess it up, so be careful. ;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance. ;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right. ;; If there is more than one, they won't work right.
'(tuareg-font-lock-operator-face ((t (:inherit font-lock-keyword-face))))) )
(require 'autopair) (require 'autopair)
(autopair-global-mode) (autopair-global-mode)
@ -119,19 +119,6 @@
;; prettify symbols ;; prettify symbols
(global-prettify-symbols-mode 1) (global-prettify-symbols-mode 1)
(setq coq-symbols
'(
("forall" ?∀)
("->" ?→)
("exists" ?∃)
("=>" ?⇒)
))
(add-hook 'coq-mode-hook
(lambda ()
(dolist (binding coq-symbols)
(push binding prettify-symbols-alist))))
(put 'narrow-to-region 'disabled nil) (put 'narrow-to-region 'disabled nil)
(global-hl-line-mode 1) (global-hl-line-mode 1)
@ -176,7 +163,6 @@
(require 'php-mode) (require 'php-mode)
(require 'markdown-mode) (require 'markdown-mode)
(add-to-list 'auto-mode-alist '("\\.md\\'" . markdown-mode)) (add-to-list 'auto-mode-alist '("\\.md\\'" . markdown-mode))
@ -201,9 +187,6 @@
;; delete trailing whitespace on save ;; delete trailing whitespace on save
(add-hook 'prog-mode-hook (lambda () (add-to-list 'write-file-functions 'delete-trailing-whitespace))) (add-hook 'prog-mode-hook (lambda () (add-to-list 'write-file-functions 'delete-trailing-whitespace)))
(require 'jinja2-mode)
(add-to-list 'auto-mode-alist '("\\.jinja2\\'" . jinja2-mode))
;; found at https://gist.github.com/NFicano/1356280 ;; found at https://gist.github.com/NFicano/1356280
;; modified for 24.3 ;; modified for 24.3
@ -252,13 +235,10 @@ they line up with the line containing the corresponding opening bracket."
(add-hook 'haskell-mode-hook 'turn-on-haskell-indent) (add-hook 'haskell-mode-hook 'turn-on-haskell-indent)
(require 'web-mode) (require 'web-mode)
(add-to-list 'auto-mode-alist '("\\.phtml\\'" . web-mode)) (add-to-list 'auto-mode-alist '("\\.php\\'" . web-mode))
(add-to-list 'auto-mode-alist '("\\.tpl\\.php\\'" . web-mode)) (add-to-list 'auto-mode-alist '("\\.jsx?\\'" . web-mode))
(add-to-list 'auto-mode-alist '("\\.[agj]sp\\'" . web-mode)) (add-to-list 'auto-mode-alist '("\\.scss\\'" . web-mode))
(add-to-list 'auto-mode-alist '("\\.as[cp]x\\'" . web-mode)) (add-to-list 'auto-mode-alist '("\\.html\\'" . web-mode))
(add-to-list 'auto-mode-alist '("\\.erb\\'" . web-mode))
(add-to-list 'auto-mode-alist '("\\.mustache\\'" . web-mode))
(add-to-list 'auto-mode-alist '("\\.djhtml\\'" . web-mode))
(add-hook 'web-mode-hook (add-hook 'web-mode-hook
(lambda () (lambda ()
@ -271,11 +251,6 @@ they line up with the line containing the corresponding opening bracket."
(setq web-mode-enable-html-colorization t) (setq web-mode-enable-html-colorization t)
(setq web-mode-enable-css-colorization t) (setq web-mode-enable-css-colorization t)
(set-face-attribute 'web-mode-html-attr-name-face nil :foreground "#3387cc")
(set-face-attribute 'web-mode-html-attr-equal-face nil :foreground "gray60")
(set-face-attribute 'web-mode-html-tag-bracket-face nil :foreground "gray60")
(set-face-attribute 'web-mode-html-tag-face nil :foreground "#e9c062")
(define-key web-mode-map (kbd "C-c /") 'web-mode-element-close))) (define-key web-mode-map (kbd "C-c /") 'web-mode-element-close)))
(require 'go-mode-autoloads) (require 'go-mode-autoloads)
@ -284,9 +259,5 @@ they line up with the line containing the corresponding opening bracket."
(load-theme 'jdkaplan t) (load-theme 'jdkaplan t)
;; (load-theme 'jdkaplan-light t) ;; (load-theme 'jdkaplan-light t)
;; sup (require 'jsx-mode)
(add-to-list 'auto-mode-alist '("/sup.*eml$" . message-mode)) (require 'js2-mode)
(add-hook 'message-mode-hook
(lambda ()
(auto-fill-mode 1)
(search-forward-regexp "^$")))