Fix magit

This commit is contained in:
2024-04-07 11:53:57 -07:00
parent d583d02cd5
commit f97856c238
3 changed files with 104 additions and 87 deletions

View File

@@ -42,3 +42,18 @@
(elpaca elpaca-use-package
(elpaca-use-package-mode))
(elpaca-wait)
;; Magit depends on newer versions of seq/transient than Emacs bundles, but Elpaca
;; can't or won't update them on its own.
(defun +elpaca-unload-seq (e)
(and (featurep 'seq) (unload-feature 'seq t))
(elpaca--continue-build e))
(defun +elpaca-seq-build-steps ()
(append (butlast (if (file-exists-p (expand-file-name "seq" elpaca-builds-directory))
elpaca--pre-built-steps elpaca-build-steps))
(list '+elpaca-unload-seq 'elpaca--activate-package)))
(use-package seq :ensure `(seq :build ,(+elpaca-seq-build-steps)))
(use-package transient :ensure t)
(elpaca-wait)

View File

@@ -0,0 +1,87 @@
(provide 'thoom-tweaks)
;; When scrolling by page and hitting top/bottom, move cursor to top/bottom of buffer
(setq-default scroll-error-top-bottom t)
;; Revert buffers when the underlying file has changed
(global-auto-revert-mode 1)
;; Remember recent files
(recentf-mode 1)
;; Save what you enter into minibuffer prompts
(setq history-length 25)
(savehist-mode 1)
;; Visually mark the line the cursor is on
(global-hl-line-mode 1)
;; Enable repeat mode. Keymaps are defined through use-package's :repeat-map directive.
(repeat-mode 1)
;; TODO - Decide whether to enable this
;; (defalias 'yes-or-no-p 'y-or-n-p)
;; tabs are for monsters
(setq-default indent-tabs-mode nil)
(setq-default tab-width 4)
(setq-default sentence-end-double-space nil)
;; TODO - keybindings
(use-package hl-todo
:ensure t
:init
(global-hl-todo-mode))
;; TODO https://github.com/jdtsmith/outli
(use-package which-key
:ensure t
:init
(which-key-mode)
(which-key-setup-side-window-bottom))
;; Dired
;; (use-package dired
;; :bind (:map dired-mode-map
;; ("h" . dired-up-directory)
;; ("l" . dired-find-file)))
;; Treesitter
;; TODO https://github.com/renzmann/treesit-auto
;; LSP
;; TODO https://github.com/blahgeek/emacs-lsp-booster
;; TODO Use right-option as regular option on Mac
;; (setq ns-alternate-modifier 'meta)
;; (setq ns-right-alternate-modifier 'none)
;; TODO https://github.com/stsquad/emacs_chrome
;; TODO https://github.com/astoff/devdocs.el
;; TODO https://github.com/casouri/vundo
;
;; TODO https://karthinks.com/software/avy-can-do-anything/
(defun thoom/org-clear-all ()
(interactive)
(goto-char 0)
(org-map-entries
(lambda ()
(org-todo "")))
(flush-lines "CLOSED")
(message "Entries cleared."))
;; (use-package dumb-jump
;; :ensure t
;; :config
;; (add-hook 'xref-backend-functions #'dumb-jump-xref-activate)
;; (setq xref-show-definitions-function #'xref-show-definitions-completing-read))
(use-package direnv
:ensure t
:config
(direnv-mode))