Henrik Lissner
2025-08-09 22:32:33 +02:00
parent 708cf08a74
commit a1121acc94
13 changed files with 30 additions and 42 deletions

View File

@ -1,5 +1,5 @@
;; -*- no-byte-compile: t; -*-
;;; ui/doom/packages.el
(package! doom-themes :pin "729ad034631cba41602ad9191275ece472c21941")
(package! doom-themes :pin "3152c60bb55365ebd3b042a40aa68c9b756667f7")
(package! solaire-mode :pin "c9334666bd208f3322e6118d30eba1b2438e2bb9")

View File

@ -1,4 +1,4 @@
;; -*- no-byte-compile: t; -*-
;;; ui/hl-todo/packages.el
(package! hl-todo :pin "7ed8bbcadb5229d648b194e0e4c4d261825aa91b")
(package! hl-todo :pin "b8be53068b3469572d66cfedc540f4130901a3da")

View File

@ -3,4 +3,4 @@
(package! indent-bars
:recipe (:host github :repo "jdtsmith/indent-bars")
:pin "87729d685d49ebbfcfdb3d16ca0369c4eef42c20")
:pin "aa07a3d812c64445d44796b85fca07044864f64b")

View File

@ -2,7 +2,7 @@
;;; ui/modeline/packages.el
(unless (modulep! +light)
(package! doom-modeline :pin "a85cb28da8bcb29be232e21879f0f5a1e8551b8c"))
(package! doom-modeline :pin "cb703c217e8eb4d6f853da7fca9f1be91d985642"))
(package! anzu :pin "21cb5ab2295614372cb9f1a21429381e49a6255f")
(when (modulep! :editor evil)
(package! evil-anzu :pin "7309650425797420944075c9c1556c7c1ff960b3"))

View File

@ -1,4 +1,4 @@
;; -*- no-byte-compile: t; -*-
;;; ui/neotree/packages.el
(package! neotree :pin "4a4cd8576157a39c0fdb478a2887c01ccfe1aec9")
(package! neotree :pin "3178805a0942696d1e5162575d9cab43d14b7970")

View File

@ -3,4 +3,4 @@
(if (modulep! :editor evil)
(package! evil-goggles :pin "34ca276a85f615d2b45e714c9f8b5875bcb676f3")
(package! goggles :pin "5176114e99d4c13f57777abbcbcea0dbee9e4ca3"))
(package! goggles :pin "791140df23e11436ba825043e85c47a41fd65c5c"))

View File

@ -3,7 +3,7 @@
(package! ultra-scroll
:recipe (:host github :repo "jdtsmith/ultra-scroll")
:pin "b447044b9de68068139da9ab367126e973a6a0b0")
:pin "8c92a17743af05fedc76beeb58da5eab48398035")
(when (modulep! +interpolate)
(package! good-scroll :pin "a7ffd5c0e5935cebd545a0570f64949077f71ee3"))

View File

@ -1,7 +1,7 @@
;; -*- no-byte-compile: t; -*-
;;; ui/treemacs/packages.el
(package! treemacs :pin "abd27c86df6b7bf8bc7d4c2a86b4ea9e425084c7")
(package! treemacs :pin "5fa84199501fd43e5573b1277a2b1699c7473cc1")
(package! treemacs-nerd-icons :pin "eac9fb5d92b8b29e7c4fcf9f3baddb2cb0b04575")
;; These packages have no :pin because they're in the same repo
(when (modulep! :editor evil +everywhere)

View File

@ -75,23 +75,6 @@ Respects `diff-hl-disable-on-remote'."
(file-remote-p default-directory))
(diff-hl-dired-mode +1))))
;; HACK: diff-hl won't be visible in TTY frames, but there's no simple way to
;; use the fringe in GUI Emacs *and* use the margin in the terminal *AND*
;; support daemon users, so we need more than a static `display-graphic-p'
;; check at startup.
(if (not (daemonp))
(unless (display-graphic-p)
(add-hook 'global-diff-hl-mode-hook #'diff-hl-margin-mode))
(when (modulep! :os tty)
(put 'diff-hl-mode 'last t)
(add-hook! 'doom-switch-window-hook
(defun +vc-gutter-use-margins-in-tty-h ()
(when (bound-and-true-p global-diff-hl-mode)
(let ((graphic? (display-graphic-p)))
(unless (eq (get 'diff-hl-mode 'last) graphic?)
(diff-hl-margin-mode (if graphic? -1 +1))
(put 'diff-hl-mode 'last graphic?))))))))
:config
(set-popup-rule! "^\\*diff-hl" :select nil)
@ -120,12 +103,17 @@ Respects `diff-hl-disable-on-remote'."
:n "S" #'diff-hl-show-hunk-stage-hunk))
;; UX: Refresh gutter in the selected buffer on ESC, switching windows, or
;; refocusing the frame.
(defvar-local +vc-gutter--last-state nil)
(add-hook! '(doom-escape-hook doom-switch-window-hook doom-switch-frame-hook) :append
(defun +vc-gutter-update-h (&rest _)
"Return nil to prevent shadowing other `doom-escape-hook' hooks."
(ignore (and (or (bound-and-true-p diff-hl-mode)
(bound-and-true-p diff-hl-dir-mode))
(diff-hl-update-once)))))
(or (null +vc-gutter--last-state)
(not (equal +vc-gutter--last-state
(symbol-plist (intern (expand-file-name buffer-file-name)
vc-file-prop-obarray)))))
(diff-hl-update)))))
;; UX: Update diff-hl when magit alters git state.
(when (modulep! :tools magit)
(add-hook 'magit-post-refresh-hook #'diff-hl-magit-post-refresh))
@ -182,10 +170,8 @@ Respects `diff-hl-disable-on-remote'."
delay-mode-hooks
(null (buffer-file-name (buffer-base-buffer)))
(null (get-buffer-window (current-buffer))))
(if (and diff-hl-update-async
(not
(run-hook-with-args-until-success 'diff-hl-async-inhibit-functions
default-directory)))
(setq diff-hl-timer nil)
(if (diff-hl--use-async-p)
(progn
(+vc-gutter--kill-thread)
(setq +vc-gutter--diff-hl-thread
@ -197,11 +183,11 @@ Respects `diff-hl-disable-on-remote'."
(diff-hl--update))
t))
(defadvice! +vc-gutter--only-tick-on-success-a (&rest _)
:override #'diff-hl-update-once
(unless (equal diff-hl--modified-tick (buffer-chars-modified-tick))
(when (diff-hl-update)
(setq diff-hl--modified-tick (buffer-chars-modified-tick)))))
;; (defadvice! +vc-gutter--only-tick-on-success-a (&rest _)
;; :override #'diff-hl-update-once
;; (unless (equal diff-hl--modified-tick (buffer-chars-modified-tick))
;; (when (diff-hl-update)
;; (setq diff-hl--modified-tick (buffer-chars-modified-tick)))))
;; HACK: This advice won't work in *all* cases (it's a C function, and any
;; calls to it from C won't trigger advice), but the thread issues above are

View File

@ -1,4 +1,4 @@
;; -*- no-byte-compile: t; -*-
;;; ui/vc-gutter/packages.el
(package! diff-hl :pin "9b032018fda8eb6c241bba1ec0e5c354ad523b2c")
(package! diff-hl :pin "39f076efa85110c4bcc9b73994f30a7d52312c98")

View File

@ -606,7 +606,7 @@ This be hooked to `projectile-after-switch-project-hook'."
(funcall +workspaces-switch-project-function proot))))))
;;;###autoload
(defun +workspaces-save-tab-bar-data-h (_)
(defun +workspaces-save-tab-bar-data-h (&rest _)
"Save the current workspace's tab bar data."
(when (get-current-persp)
(set-persp-parameter
@ -622,7 +622,7 @@ This be hooked to `projectile-after-switch-project-hook'."
(frameset-filter-tabs (tab-bar-tabs) nil nil t))))
;;;###autoload
(defun +workspaces-load-tab-bar-data-h (_)
(defun +workspaces-load-tab-bar-data-h (&rest _)
"Restores the tab bar data of the workspace we have just switched to."
(tab-bar-tabs-set (persp-parameter 'tab-bar-tabs))
(setq tab-bar-closed-tabs (persp-parameter 'tab-bar-closed-tabs))

View File

@ -107,7 +107,7 @@ stored in `persp-save-dir'.")
(add-to-list 'window-persistent-parameters '(winner-ring . t))
(add-hook! 'persp-before-deactivate-functions
(defun +workspaces-save-winner-data-h (_)
(defun +workspaces-save-winner-data-h (&rest _)
(when (and (bound-and-true-p winner-mode)
(get-current-persp))
(set-persp-parameter
@ -116,7 +116,7 @@ stored in `persp-save-dir'.")
winner-pending-undo-ring)))))
(add-hook! 'persp-activated-functions
(defun +workspaces-load-winner-data-h (_)
(defun +workspaces-load-winner-data-h (&rest _)
(when (bound-and-true-p winner-mode)
(cl-destructuring-bind
(currents alist pending-undo-ring)
@ -212,7 +212,9 @@ stored in `persp-save-dir'.")
(advice-add #'persp-asave-on-exit :around #'+workspaces-autosave-real-buffers-a)
;; Fix #1973: visual selection surviving workspace changes
(add-hook 'persp-before-deactivate-functions #'deactivate-mark)
(add-hook! 'persp-before-deactivate-functions
(defun +workspaces-disable-mark-after-switch-h (&rest _)
(deactivate-mark)))
;; Fix #1017: stop session persistence from restoring a broken posframe
(after! posframe

View File

@ -1,4 +1,4 @@
;; -*- no-byte-compile: t; -*-
;;; ui/workspaces/packages.el
(package! persp-mode :pin "40e9993a9711cba5fb56dfec81a507fabeba9668")
(package! persp-mode :pin "f146ddccaf598feb402664bc6848b60321b2dc78")