.emacs.d

My Emacs configuration files.
Log | Files | Refs | README

commit 2222108f7d0b16ac20bce4a6b172983739d0a842
parent cc5661860cb0d84d72f17d974965325aacc4a472
Author: Hugo Soucy <hugo.soucy@savoirfairelinux.com>
Date:   Fri, 29 Jul 2016 10:57:07 -0400

Update .emacs.d.

Diffstat:
M.gitignore | 9+++++++--
Mbookmarks | 15++++++++++-----
Mcustom.el | 2+-
Minit.el | 15+++++++++------
Mlisp/setup-appearance.el | 16+++-------------
Alisp/setup-company-mode.el | 27+++++++++++++++++++++++++++
Alisp/setup-editorconfig.el | 8++++++++
Alisp/setup-email.el | 9+++++++++
Dlisp/setup-helm-mode.el | 3---
Mlisp/setup-js-mode.el | 3+++
Mlisp/setup-magit.el | 4++--
Mlisp/setup-markdown-mode.el | 2+-
Mlisp/setup-package.el | 2+-
Mlisp/setup-web-mode.el | 7++-----
14 files changed, 83 insertions(+), 39 deletions(-)

diff --git a/.gitignore b/.gitignore @@ -11,4 +11,10 @@ elpa .DS_Store /setup-smtp.el /.mc-lists.el -url- \ No newline at end of file +url +custom.el +bookmarks +.mc-lists.el +games +games/ +viper diff --git a/bookmarks b/bookmarks @@ -2,8 +2,13 @@ ;;; This format is meant to be slightly human-readable; ;;; nevertheless, you probably don't want to edit it. ;;; -*- End Of Bookmark File Format Version Stamp -*- -(("sync" - (filename . "~/_Sync/") +(("performcoop" + (filename . "~/_Projets/perform-coop/socodevi-performcoop/django/") + (front-context-string . "frontend\n -rw-r") + (rear-context-string . "96 Dec 3 15:13 ") + (position . 496)) +("sync" + (filename . "~/ownCloud/_Sync/") (front-context-string . "bdd\n drwx------") (rear-context-string . "96 jun 30 08:43 ") (position . 227)) @@ -13,17 +18,17 @@ (rear-context-string . "96 jun 9 10:48 ") (position . 331)) ("notes" - (filename . "~/_Sync/notes/") + (filename . "~/ownCloud/_Sync/notes-sfl/") (front-context-string . "klist accessibil") (rear-context-string . "e;\n*** TODO Chec") (position . 3457)) ("hugosoucycc" - (filename . "~/_Sync/projets/hscc/") + (filename . "~/_Projets/hugosoucycc/") (front-context-string . "archetypes\n -rw") (rear-context-string . "96 aoû 15 16:51 ") (position . 259)) ("walter-theme" - (filename . "~/_Projets/walter/walter-com/src/themes/walter-theme/src/main/webapp/") + (filename . "~/_Projets/walter-com/src/themes/walter-theme/src/main/webapp/") (front-context-string . "..\n -rw-r--r-- ") (rear-context-string . "96 fév 18 14:44 ") (position . 231)) diff --git a/custom.el b/custom.el @@ -6,7 +6,7 @@ '(column-number-mode t) '(custom-safe-themes (quote - ("e16a771a13a202ee6e276d06098bc77f008b73bbac4d526f160faa2d76c1dd0e" "9b94a52c25ea76b72df2050928d18e7fe9060e9c7f7d992f33bf35d4931b0444" "009d2b33a4c04e847e36b77803daed44c77646e58e218271d609c85876091180" "9dae95cdbed1505d45322ef8b5aa90ccb6cb59e0ff26fef0b8f411dfc416c552" "7fbb8d064286706fb1e319c9d3c0a8eafc2efe6b19380aae9734c228b05350ae" "3b819bba57a676edf6e4881bd38c777f96d1aa3b3b5bc21d8266fa5b0d0f1ebf" "8aebf25556399b58091e533e455dd50a6a9cba958cc4ebb0aab175863c25b9a4" "f0a99f53cbf7b004ba0c1760aa14fd70f2eabafe4e62a2b3cf5cabae8203113b" "8b231ba3e5f61c2bb1bc3a2d84cbd16ea17ca13395653566d4dfbb11feaf8567" "7a9f392481b6e2fb027ab9d8053ab36c0f23bf5cc1271206982339370d894c74" "ed81411169b1b3e3d4cfc39b09d68ea13e0ff7708dc5b9d0bedb319e071968ad" "8eef22cd6c122530722104b7c82bc8cdbb690a4ccdd95c5ceec4f3efa5d654f5" default))) + ("dcbe22bc74153257f412183dd14ab9652197f59adf65646e618c2577e7cca34d" "b97a01622103266c1a26a032567e02d920b2c697ff69d40b7d9956821ab666cc" "1168d6e8c72d859d09da65c358b8e7ce9880efe6a190884ec269efcb8ada5809" "e16a771a13a202ee6e276d06098bc77f008b73bbac4d526f160faa2d76c1dd0e" "9b94a52c25ea76b72df2050928d18e7fe9060e9c7f7d992f33bf35d4931b0444" "009d2b33a4c04e847e36b77803daed44c77646e58e218271d609c85876091180" "9dae95cdbed1505d45322ef8b5aa90ccb6cb59e0ff26fef0b8f411dfc416c552" "7fbb8d064286706fb1e319c9d3c0a8eafc2efe6b19380aae9734c228b05350ae" "3b819bba57a676edf6e4881bd38c777f96d1aa3b3b5bc21d8266fa5b0d0f1ebf" "8aebf25556399b58091e533e455dd50a6a9cba958cc4ebb0aab175863c25b9a4" "f0a99f53cbf7b004ba0c1760aa14fd70f2eabafe4e62a2b3cf5cabae8203113b" "8b231ba3e5f61c2bb1bc3a2d84cbd16ea17ca13395653566d4dfbb11feaf8567" "7a9f392481b6e2fb027ab9d8053ab36c0f23bf5cc1271206982339370d894c74" "ed81411169b1b3e3d4cfc39b09d68ea13e0ff7708dc5b9d0bedb319e071968ad" "8eef22cd6c122530722104b7c82bc8cdbb690a4ccdd95c5ceec4f3efa5d654f5" default))) '(display-battery-mode t) '(display-time-mode t) '(elfeed-feeds diff --git a/init.el b/init.el @@ -52,9 +52,6 @@ ;; Setup Magit-Mode (require 'setup-magit) -;; Setup Multi-Web-Mode -(require 'setup-multi-web-mode) - ;; Setup Web-Mode (require 'setup-web-mode) @@ -70,9 +67,6 @@ ;; Setup Markdown (require 'setup-markdown-mode) -;; Setup HELM -;; (require 'setup-helm-mode) - ;; Setup HTML/SGML (require 'setup-html-mode) @@ -91,9 +85,18 @@ ;; Setup Undo-Tree (require 'setup-undo-tree) +;; Setup Email +(require 'setup-email) + ;; Setup key bindings (require 'key-bindings) +;; Setup key bindings +(require 'setup-editorconfig) + +;; Setup key bindings +(require 'setup-company-mode) + ;; Bookmarks ;; To have emacs open bookmarks on startup (setq inhibit-splash-screen t) diff --git a/lisp/setup-appearance.el b/lisp/setup-appearance.el @@ -1,5 +1,5 @@ ;; Theme -(load-theme 'zenburn t) +(load-theme 'dracula t) ;; Fonts ;; Custom font face (120 === 12pt) @@ -21,18 +21,8 @@ '(tab-width 4) '(indent-tabs-mode nil) ) -;; (setq tab-width 4) ; or any other preferred value -;; (defvaralias 'c-basic-offset 'tab-width) -;; (defvaralias 'cperl-indent-level 'tab-width) -;; Enlarge the frame automaticly on startup -;; (defun fullscreen (&optional f) -;; (interactive) -;; (x-send-client-message nil 0 nil "_NET_WM_STATE" 32 -;; '(2 "_NET_WM_STATE_MAXIMIZED_VERT" 0)) -;; (x-send-client-message nil 0 nil "_NET_WM_STATE" 32 -;; '(2 "_NET_WM_STATE_MAXIMIZED_HORZ" 0))) - -;;(fullscreen()) +;; Fix the indentation for the `switch` statement +(c-set-offset 'case-label '+) (provide 'setup-appearance) diff --git a/lisp/setup-company-mode.el b/lisp/setup-company-mode.el @@ -0,0 +1,27 @@ +;; COMPANY MODE SETUP FILE + +;; Load company mode +;; and company mode html backend +(require 'company) +(require 'company-web-html) + +;; Possible improvements of company-mode + +;; Bigger popup window +(setq company-tooltip-limit 20) + +;; Align annotations to the right tooltip border +(setq company-tooltip-align-annotations 't) + +;; Decrease delay before autocompletion popup shows +(setq company-idle-delay .3) + +; Start autocompletion only after typing +(setq company-begin-commands '(self-insert-command)) + + +;; Enabled Company Mode on startup +(add-hook 'after-init-hook 'global-company-mode) +(setq company-etags-everywhere '(php-mode html-mode web-mode nxml-mode)) + +(provide 'setup-company-mode) diff --git a/lisp/setup-editorconfig.el b/lisp/setup-editorconfig.el @@ -0,0 +1,8 @@ +;; EditorConfig Setup +;; http://editorconfig.org/ +(require 'editorconfig) + +(editorconfig-mode 1) + +(provide 'setup-editorconfig) + diff --git a/lisp/setup-email.el b/lisp/setup-email.el @@ -0,0 +1,9 @@ +;; EMAIL SETUP FILE + +;; OfflineImap mode +(require 'offlineimap) + +(add-hook 'gnus-before-startup-hook 'offlineimap) + +(provide 'setup-email) + diff --git a/lisp/setup-helm-mode.el b/lisp/setup-helm-mode.el @@ -1,3 +0,0 @@ -(helm-mode 1) - -(provide 'setup-helm-mode) diff --git a/lisp/setup-js-mode.el b/lisp/setup-js-mode.el @@ -1,3 +1,6 @@ (add-to-list 'auto-mode-alist '("\\.js\\'" . js2-mode)) +;; Fix the indentation for the `switch` statement +;; (setq js-switch-indent-offset 4) +(setq js2-indent-switch-body t) (provide 'setup-js-mode) diff --git a/lisp/setup-magit.el b/lisp/setup-magit.el @@ -3,8 +3,8 @@ ;; Change Magit diff colors (eval-after-load 'magit '(progn - (set-face-foreground 'magit-diff-add "green3") - (set-face-foreground 'magit-diff-del "#ff4500") + ;; (set-face-foreground 'magit-diff-add "green3") + ;; (set-face-foreground 'magit-diff-del "#ff4500") (when (not window-system) (set-face-background 'magit-item-highlight "black")))) diff --git a/lisp/setup-markdown-mode.el b/lisp/setup-markdown-mode.el @@ -4,6 +4,6 @@ (cons '("\\.md" . markdown-mode) auto-mode-alist)) (setq markdown-command "pandoc -s -f markdown -t html5") -(setq markdown-css-path "/home/hs0ucy/.emacs.d/github-markdown.css") +(setq markdown-css-paths "/home/hs0ucy/.emacs.d/github-markdown.css") (provide 'setup-markdown-mode) diff --git a/lisp/setup-package.el b/lisp/setup-package.el @@ -2,7 +2,7 @@ (require 'package) (package-initialize) (add-to-list 'package-archives '("melpa-stable" . "http://melpa-stable.milkbox.net/packages/") t) - (add-to-list 'package-archives '("marmalade" . "https://marmalade-repo.org/packages/")) + (add-to-list 'package-archives '("marmalade" . "https://marmalade-repo.org/packages/") t) ) (provide 'setup-package) diff --git a/lisp/setup-web-mode.el b/lisp/setup-web-mode.el @@ -2,6 +2,8 @@ ;; templates: HTML documents embedding CSS / JavaScript and Server ;; blocks. +(add-to-list 'auto-mode-alist '("\\.html\\'" . web-mode)) +(add-to-list 'auto-mode-alist '("\\.xhtml\\'" . web-mode)) (add-to-list 'auto-mode-alist '("\\.phtml\\'" . web-mode)) (add-to-list 'auto-mode-alist '("\\.tpl\\.php\\'" . web-mode)) (add-to-list 'auto-mode-alist '("\\.jsp\\'" . web-mode)) @@ -12,9 +14,4 @@ (add-to-list 'auto-mode-alist '("\\.djhtml\\'" . web-mode)) (add-to-list 'auto-mode-alist '("\\.twig\\'" . web-mode)) -(defun web-mode-hook () - "Hooks for Web mode." - (setq web-mode-markup-indent-offset 4) ) -(add-hook 'web-mode-hook 'web-mode-hook) - (provide 'setup-web-mode)