From 4007ca81e0105119c8ed754e654a731934f5154c Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Sun, 8 Apr 2018 16:13:12 -0700 Subject: [emacs] Large refactoring. At first I wanted to add support for java, and then I realized that maintaining a giant file with all the packages was not working as I was expected. The configuration is broken down to multiple files now, with each major mode in a separate file, and the main modules in their own too. This should make it easier to maintain and organize. --- emacs.d/modules/module-git.el | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 emacs.d/modules/module-git.el (limited to 'emacs.d/modules/module-git.el') diff --git a/emacs.d/modules/module-git.el b/emacs.d/modules/module-git.el new file mode 100644 index 0000000..f974bfe --- /dev/null +++ b/emacs.d/modules/module-git.el @@ -0,0 +1,30 @@ +(require 'config-package) + +(use-package magit + :mode (("differential-update-comments" . git-commit-mode) + ("new-commit" . git-commit-mode)) + + :bind (("C-x g s" . magit-status) + ("C-x g b" . magit-checkout)) + + :init + (progn + (setq magit-completing-read-function 'ivy-completing-read)) + + :config + (progn + (global-git-commit-mode) + (use-package git-commit :ensure t :defer t) + (add-hook 'magit-mode-hook + (lambda() + (setq mode-name "⎇"))) + (add-hook 'magit-log-edit-mode-hook + #'(lambda () + (set-fill-column 72) + (flyspell-mode))))) + +;; I don't care about any frontend other than magit +(setf vc-handled-backends nil + vc-follow-symlinks t) + +(provide 'module-git) -- cgit 1.4.1