Updating dotfiles.

This commit is contained in:
Derek Taylor
2020-09-29 16:28:27 -05:00
parent e8ae19d7ad
commit af5b75ee4d
204 changed files with 1870 additions and 2063 deletions

View File

@@ -6,7 +6,7 @@
;; support symlinks as unix knows them, so `magit-version' can't resolve
;; its own repo's path.
;;;###autoload
(when! IS-WINDOWS
(eval-when! IS-WINDOWS
(defadvice! +magit--ignore-version-a (&optional print-dest)
:override #'magit-version
(when print-dest
@@ -63,18 +63,26 @@
This differs from `display-buffer-in-direction' in one way: it will try to use a
window that already exists in that direction. It will split otherwise."
(let ((direction (or (alist-get 'direction alist)
+magit-open-windows-in-direction)))
+magit-open-windows-in-direction))
(origin-window (selected-window)))
(if-let (window (window-in-direction direction))
(select-window window)
(if-let (window (window-in-direction
(pcase direction
(`right 'left)
(`left 'right)
((or `up `above) 'down)
((or `down `below) 'up))))
(if-let (window (and (not (one-window-p))
(window-in-direction
(pcase direction
(`right 'left)
(`left 'right)
((or `up `above) 'down)
((or `down `below) 'up)))))
(select-window window)
(split-window-horizontally)))
(switch-to-buffer buffer)
(let ((window (split-window nil nil direction)))
(when (memq direction '(right down below))
(select-window window))
(display-buffer-record-window 'reuse window buffer)
(set-window-buffer window buffer)
(set-window-parameter window 'quit-restore (list 'window 'window origin-window buffer))
(set-window-prev-buffers window nil))))
(switch-to-buffer buffer t t)
(selected-window)))

View File

@@ -18,12 +18,17 @@ For example, diffs and log buffers. Accepts `left', `right', `up', and `down'.")
transient-values-file (concat doom-etc-dir "transient/values")
transient-history-file (concat doom-etc-dir "transient/history"))
:config
(add-to-list 'doom-debug-variables 'magit-refresh-verbose)
(setq transient-default-level 5
magit-diff-refine-hunk t ; show granular diffs in selected hunk
;; Don't autosave repo buffers. This is too magical, and saving can
;; trigger a bunch of unwanted side-effects, like save hooks and
;; formatters. Trust us to know what we're doing.
magit-save-repository-buffers nil)
;; formatters. Trust the user to know what they're doing.
magit-save-repository-buffers nil
;; Don't display parent/related refs in commit buffers; they are rarely
;; helpful and only add to runtime costs.
magit-revision-insert-related-refs nil)
(add-hook 'magit-process-mode-hook #'goto-address-mode)
(defadvice! +magit-revert-repo-buffers-deferred-a (&rest _)
@@ -75,7 +80,8 @@ For example, diffs and log buffers. Accepts `left', `right', `up', and `down'.")
;; 2. The status screen isn't buried when viewing diffs or logs from the
;; status screen.
(setq transient-display-buffer-action '(display-buffer-below-selected)
magit-display-buffer-function #'+magit-display-buffer-fn)
magit-display-buffer-function #'+magit-display-buffer-fn
magit-bury-buffer-function #'magit-mode-quit-window)
(set-popup-rule! "^\\(?:\\*magit\\|magit:\\| \\*transient\\*\\)" :ignore t)
(add-hook 'magit-popup-mode-hook #'hide-mode-line-mode)
@@ -97,7 +103,17 @@ For example, diffs and log buffers. Accepts `left', `right', `up', and `down'.")
(define-key magit-status-mode-map [remap magit-mode-bury-buffer] #'+magit/quit)
;; Close transient with ESC
(define-key transient-map [escape] #'transient-quit-one))
(define-key transient-map [escape] #'transient-quit-one)
;; An optimization that particularly affects macOS and Windows users: by
;; resolving `magit-git-executable' Emacs does less work to find the
;; executable in your PATH, which is great because it is called so frequently.
;; However, absolute paths will break magit in TRAMP/remote projects if the
;; git executable isn't in the exact same location.
(add-hook! 'magit-status-mode-hook
(defun +magit-optimize-process-calls-h ()
(when-let (path (executable-find magit-git-executable))
(setq-local magit-git-executable path)))))
(use-package! forge

View File

@@ -1,9 +1,9 @@
;; -*- no-byte-compile: t; -*-
;;; tools/magit/packages.el
(when (package! magit :pin "798aff56457aef4d1896db8129ab56d08ae12066")
(when (package! magit :pin "321214c3a2dd10fdf672ba96bd00703a51094bbe")
(when (featurep! +forge)
(package! forge :pin "2c487465d0b78ffe34252b47fcc06e27039330c4"))
(package! forge :pin "feee7e2fce3f87f7aa113c5edcb1896127ee9d12"))
(package! magit-gitflow :pin "cc41b561ec6eea947fe9a176349fb4f771ed865b")
(package! magit-todos :pin "a0e5d1f3c7dfcb4f18c1b0d57f1746a4872df5c6")
(package! github-review :pin "fab440aeae4fbf6a8192fd11795052e9eb5d27d1")