Update init and custom files.

This commit is contained in:
Mikaël Capelle 2016-04-08 20:30:33 +02:00
parent a52ce41181
commit 9d270c3509
2 changed files with 45 additions and 8 deletions

View File

@ -1,8 +1,18 @@
;;; custom.el -- Face & Variable customization
;;; Commentary:
;; This file is mainly generated by Emacs' customize-* commands.
;;; Code:
(custom-set-variables (custom-set-variables
;; custom-set-variables was added by Custom. ;; custom-set-variables was added by Custom.
;; 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.
'(compilation-scroll-output t)
'(electric-pair-pairs (quote ((34 . 34) (123 . 125))))
'(flycheck-gcc-args (quote (""))) '(flycheck-gcc-args (quote ("")))
'(package-selected-packages '(package-selected-packages
(quote (quote
@ -37,5 +47,15 @@
'(flycheck-fringe-error ((t (:inherit font-lock-warning-face :background "firebrick" :foreground "white")))) '(flycheck-fringe-error ((t (:inherit font-lock-warning-face :background "firebrick" :foreground "white"))))
'(flycheck-fringe-warning ((t (:inherit warning)))) '(flycheck-fringe-warning ((t (:inherit warning))))
'(linum ((t (:inherit fringe :background "white" :foreground "gray")))) '(linum ((t (:inherit fringe :background "white" :foreground "gray"))))
'(mmm-code-submode-face ((t (:background "white"))))
'(mmm-default-submode-face ((t (:background "white"))))
'(web-mode-doctype-face ((t (:foreground "darkgray"))))
'(web-mode-html-attr-equal-face ((t (:inherit web-mode-html-attr-name-face :foreground "chocolate"))))
'(web-mode-html-attr-name-face ((t (:foreground "chocolate"))))
'(web-mode-html-attr-value-face ((t (:inherit font-lock-string-face :foreground "sea green"))))
'(web-mode-html-tag-face ((t (:foreground "steel blue"))))
'(whitespace-line ((t (:background "lightgray" :foreground "dark violet" :init font-lock-warning-face)))) '(whitespace-line ((t (:background "lightgray" :foreground "dark violet" :init font-lock-warning-face))))
'(whitespace-space ((t (:background "white" :foreground "gray"))))) '(whitespace-space ((t (:background "white" :foreground "gray")))))
(provide 'custom)
;;; custom.el ends here

View File

@ -1,3 +1,12 @@
;;; init.el --- Init file for emacs
;;; Commentary:
;; Init file, load everything necessary to have a full functional Emacs, this should
;; not be used with Emacs < 24.
;;; Code:
(add-to-list 'load-path "~/.emacs.d/one-file-mode/") (add-to-list 'load-path "~/.emacs.d/one-file-mode/")
;; Themes ;; Themes
@ -86,19 +95,13 @@
(helm-mode 1) (helm-mode 1)
(projectile-global-mode) (projectile-global-mode)
(setq projectile-completion-system 'helm) (setq projectile-completion-system 'helm)
(add-to-list 'helm-boring-buffer-regexp-list "\\*.*")
(helm-projectile-on)) (helm-projectile-on))
(use-package yasnippet (use-package yasnippet
:config :config
(yas-global-mode 1)) (yas-global-mode 1))
;; (defun flycheck-autolist-hook ()
;; (let ((buffer-name "*Flycheck errors*"))
;; (if (get-buffer buffer-name)
;; (if (flycheck-has-current-errors-p)
;; (flycheck-list-errors)
;; (delete-window (get-buffer-window buffer-name))))))
(use-package flycheck (use-package flycheck
:config :config
(require 'flycheck-color-mode-line) (require 'flycheck-color-mode-line)
@ -106,6 +109,7 @@
(add-hook 'flycheck-mode-hook 'flycheck-pos-tip-mode) (add-hook 'flycheck-mode-hook 'flycheck-pos-tip-mode)
(add-hook 'flycheck-after-syntax-check-hook 'flycheck-autolist-hook) (add-hook 'flycheck-after-syntax-check-hook 'flycheck-autolist-hook)
(global-flycheck-mode) (global-flycheck-mode)
(setq flycheck-emacs-lisp-load-path "inherit")
(setq flycheck-clang-language-standard "-std=c++14") (setq flycheck-clang-language-standard "-std=c++14")
(setq flycheck-clang-args '("-W" "-Wall"))) (setq flycheck-clang-args '("-W" "-Wall")))
@ -199,7 +203,7 @@
(add-hook 'python-mode-hook (lambda () (setq whitespace-line-column 140))) (add-hook 'python-mode-hook (lambda () (setq whitespace-line-column 140)))
(add-hook 'LaTeX-mode-hook (lambda () (setq whitespace-line-column -1))) (add-hook 'LaTeX-mode-hook (lambda () (setq whitespace-line-column -1)))
(add-hook 'LaTeX-mode-hook (lambda () (setq whitespace-line-column -1))) (add-hook 'web-mode-hook (lambda () (setq whitespace-line-column -1)))
(global-whitespace-mode 1) (global-whitespace-mode 1)
(add-hook 'LaTeX-mode-hook 'turn-on-auto-fill) (add-hook 'LaTeX-mode-hook 'turn-on-auto-fill)
@ -303,8 +307,21 @@
;; Web mode ;; Web mode
(add-to-list 'auto-mode-alist '("\\.ctp\\'" . web-mode)) (add-to-list 'auto-mode-alist '("\\.ctp\\'" . web-mode))
(add-to-list 'auto-mode-alist '("\\.html\\'" . web-mode))
;;(use-package mmm-mode
;; :config
;; (require 'mmm-auto)
;; (setq mmm-global-mode 'maybe)
;; (mmm-add-mode-ext-class 'html-mode "\\.php\\'" 'html-php)
;; (mmm-add-mode-ext-class nil "\\.ctp\\'" 'html-php)
;; (add-to-list 'mmm-mode-ext-classes-alist '(html-mode nil html-js))
;; (add-to-list 'mmm-mode-ext-classes-alist '(html-mode nil embedded-css))
;; (add-to-list 'mmm-mode-ext-classes-alist '(html-mode nil fancy-html)))
(setq custom-file "~/.emacs.d/custom.el") (setq custom-file "~/.emacs.d/custom.el")
(load custom-file) (load custom-file)
(put 'narrow-to-region 'disabled nil) (put 'narrow-to-region 'disabled nil)
(provide 'init)
;;; init.el ends here