Files
.emacs.d/modules/siren-magit.el
Jim Myhrberg a32cf8b132 Big refactor of modules and their use of use-package
- Make use of use-package's :bind option whenever possible.
- Make use of use-package's :hook option whenever possible.
- Rename and move all mode setup functions into use-package's :init
  step.
- Other minor misc fixes and tweaks to a few modules.
2018-04-20 10:29:45 +01:00

53 lines
1.3 KiB
EmacsLisp

;;; siren-magit.el --- jimeh's Emacs Siren: magit configuration.
;;; Commentary:
;; Basic configuration for magit.
;;; Code:
(require 'siren-fci)
(require 'siren-flyspell)
(require 'siren-ediff)
(use-package magit
:bind
("C-x g". magit-status)
:hook
(siren-magit-mode . siren-magit-mode-setup)
(git-commit-mode . siren-git-commit-mode-setup)
:init
(defalias 'bl 'magit-blame)
(defun siren-magit-mode-setup ())
(defun siren-git-commit-mode-setup ()
(subword-mode)
(setq tab-width 2)
(fci-mode t)
;; (flyspell-mode) ;; in GUI causes git-commit-mode to lock up emacs
(linum-mode t)
(auto-fill-mode))
:config
(require 'magit)
(setq magit-completing-read-function 'magit-ido-completing-read
magit-status-buffer-switch-function 'switch-to-buffer
magit-bury-buffer-function 'bury-buffer
magit-restore-window-configuration nil
magit-revert-buffers 'silent
magit-default-tracking-name-function 'magit-default-tracking-name-branch-only
magit-repository-directories '("~/Projects" "~/src" "~/.emacs.d" "~/.dotfiles")
magit-display-buffer-function 'magit-display-buffer-same-window-except-diff-v1))
(use-package magit-gh-pulls
:hook (magit-mode . turn-on-magit-gh-pulls)
:config
(setq gh-use-local-git-config t))
(provide 'siren-magit)
;;; siren-magit.el ends here