aboutsummaryrefslogtreecommitdiff
path: root/.config/emacs/lisp/evil-collection/modes/forge
diff options
context:
space:
mode:
authorJack Jamison <jackqjamison@gmail.com>2026-07-30 20:09:00 -0400
committerJack Jamison <jackqjamison@gmail.com>2026-07-30 20:18:37 -0400
commit8c4e09dff83847ac7f07bf1da7751e9328006c4d (patch)
treea0e245567ce225f8bcb63b66e4d2373b5d033e4a /.config/emacs/lisp/evil-collection/modes/forge
parent1e33b30749bb1043ffc6ceb5a2fb0977446788b3 (diff)
actual final changes and get rid of junk in lisp dir
actually works fine
Diffstat (limited to '.config/emacs/lisp/evil-collection/modes/forge')
-rw-r--r--.config/emacs/lisp/evil-collection/modes/forge/README.org44
-rw-r--r--.config/emacs/lisp/evil-collection/modes/forge/evil-collection-forge.el113
2 files changed, 0 insertions, 157 deletions
diff --git a/.config/emacs/lisp/evil-collection/modes/forge/README.org b/.config/emacs/lisp/evil-collection/modes/forge/README.org
deleted file mode 100644
index b7cf5d5..0000000
--- a/.config/emacs/lisp/evil-collection/modes/forge/README.org
+++ /dev/null
@@ -1,44 +0,0 @@
-* forge
-
- Evil bindings for [[https://github.com/magit/forge][forge]].
-
- Setup disables =forge-add-default-bindings= (which would clobber evil keys
- on magit maps), then rebinds forge dispatch and remaps =magit-browse-thing=
- on the relevant magit section maps. The state used is controlled by
- =evil-collection-forge-state=.
-
-** Key bindings
-
-*** magit-mode-map
-
- | Command | Original | Evil |
- |------------------+----------+------|
- | =forge-dispatch= | (none) | =@= |
-
-*** magit-commit-section-map / magit-remote-section-map / magit-branch-section-map
-
- | Command | Original | Evil |
- |---------------------------------------------------------+----------+---------------------------------|
- | =forge-browse-dwim= / =forge-browse-remote= / =-branch= | n/a | (remap of =magit-browse-thing=) |
- | =forge-visit-topic= | n/a | =C-c C-v= (commit / branch) |
-
-** Transient extensions
-
- The following are appended to magit transients:
-
- | Transient | Suffix |
- |---------------------+-------------------------------------------|
- | =magit-dispatch= | =@= Forge |
- | =magit-fetch= | =n= forge topics, =N= forge notifications |
- | =magit-pull= | =n= forge topics, =N= forge notifications |
- | =magit-branch= | =f= pull-request, =F= from pull-request |
- | =magit-worktree= | =n= pull-request worktree |
- | =magit-status-jump= | =Np= pull-requests, =Ni= issues |
- | =magit-merge= | =M= Merge using API |
-
-** Customization
-
- | Variable | Default | Purpose |
- |----------------------------------------+----------------------+---------------------------------------------------|
- | =evil-collection-forge-use-y-for-yank= | =t= | Keep =y= as yank; also adds visual state. |
- | =evil-collection-forge-state= | =normal= or =motion= | Evil state used for forge bindings on magit maps. |
diff --git a/.config/emacs/lisp/evil-collection/modes/forge/evil-collection-forge.el b/.config/emacs/lisp/evil-collection/modes/forge/evil-collection-forge.el
deleted file mode 100644
index 1392c96..0000000
--- a/.config/emacs/lisp/evil-collection/modes/forge/evil-collection-forge.el
+++ /dev/null
@@ -1,113 +0,0 @@
-;;; evil-collection-forge.el --- Evil-based key bindings for forge -*- lexical-binding: t; -*-
-
-;; Copyright (C) 2021 James Nguyen
-
-;; Author: James Nguyen <james@jojojames.com>
-;; Maintainer: James Nguyen <james@jojojames.com>
-;; Package-Requires: ((emacs "26.3") (evil "1.2.3"))
-;; Homepage: https://github.com/emacs-evil/evil-collection
-;; Version: 0.4.1
-
-;; This file is free software; you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published
-;; by the Free Software Foundation; either version 3, or (at your
-;; option) any later version.
-;;
-;; This file is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;; GNU General Public License for more details.
-;;
-;; For a full copy of the GNU General Public License
-;; see <http://www.gnu.org/licenses/>.
-
-;;; Commentary:
-
-;; This library configures Magit and Evil to play well with each
-;; other. For some background see:
-;; https://github.com/emacs-evil/evil-collection/issues/543.
-
-;;; Code:
-
-(require 'evil-collection)
-(require 'forge nil t)
-(require 'transient nil t)
-
-(defcustom evil-collection-forge-use-y-for-yank t
- "View `evil-collection-magit-state' for more information."
- :group 'magit
- :type 'boolean)
-
-(defcustom evil-collection-forge-state
- (if evil-collection-forge-use-y-for-yank 'normal 'motion)
- "State to use for forge."
- :group 'magit
- :type 'symbol)
-
-(defvar forge-add-default-bindings)
-
-;;;###autoload
-(defun evil-collection-forge-setup ()
- "Set up `evil' bindings for `magit'."
- ;; The latest release tag of forge doesn't include
- ;; `forge-add-default-bindings' yet, it will throw an error:
- ;;
- ;; void-variable `forge-add-default-bindings'
- ;;
- ;; for GNU Guix and MELPA stable users.
- (when (bound-and-true-p forge-add-default-bindings)
- (message "Setting `forge-add-default-bindings' to nil in `evil-collection-forge-setup'.
-To suppress this message you can set this variable to nil in your init.el file.")
- (setq forge-add-default-bindings nil))
- (let ((states (if evil-collection-forge-use-y-for-yank
- `(,evil-collection-forge-state visual)
- `(,evil-collection-forge-state))))
- (dolist (state states)
- (evil-collection-define-key state 'magit-mode-map "@" 'forge-dispatch)
-
- (evil-collection-define-key
- state 'magit-commit-section-map
- [remap magit-browse-thing] 'forge-browse-dwim)
- (evil-collection-define-key
- state 'magit-remote-section-map
- [remap magit-browse-thing] 'forge-browse-remote)
- (evil-collection-define-key
- state 'magit-branch-section-map
- [remap magit-browse-thing] 'forge-browse-branch)
-
- (evil-collection-define-key
- state 'magit-commit-section-map (kbd "C-c C-v") 'forge-visit-topic)
- (evil-collection-define-key
- state 'magit-branch-section-map (kbd "C-c C-v") 'forge-visit-topic)))
-
- ;; https://github.com/magit/forge/blob/master/lisp/forge.el
-
- (transient-append-suffix 'magit-dispatch "!"
- '("@" "Forge" forge-dispatch)) ;; N -> @
-
- (transient-append-suffix 'magit-fetch "m"
- '("n" "forge topics" forge-pull))
- (transient-append-suffix 'magit-fetch "n"
- '("N" "forge notifications" forge-pull-notifications))
- (transient-append-suffix 'magit-pull "m"
- '("n" "forge topics" forge-pull))
- (transient-append-suffix 'magit-pull "n"
- '("N" "forge notifications" forge-pull-notifications))
- (transient-append-suffix 'magit-branch "w"
- '("f" "pull-request" forge-checkout-pullreq))
- (transient-append-suffix 'magit-branch "W"
- '("F" "from pull-request" forge-branch-pullreq))
- (transient-append-suffix 'magit-worktree "c"
- '("n" "pull-request worktree" forge-checkout-worktree))
- (transient-append-suffix 'magit-status-jump "w"
- '("Np" "pull-requests" forge-jump-to-pullreqs))
- (transient-append-suffix 'magit-status-jump "Np"
- '("Ni" "issues" forge-jump-to-issues))
- (transient-append-suffix 'magit-merge "a"
- '(7 "M" "Merge using API" forge-merge)))
-
-;;; evil-collection-forge.el ends soon
-(provide 'evil-collection-forge)
-;; Local Variables:
-;; End:
-;;; evil-collection-forge.el ends here