<commit_before>;;; tools/magit/config.el -*- lexical-binding: t; -*-

(def-package! magit
  :defer t
  :init
  (load "magit-autoloads" nil t)
  :config
  (set! :popup "^\\*?magit" :ignore)

  (map! :map magit-repolist-mode-map
        :n "j" #'next-line
        :n "k" #'previous-line
        :n "s" #'magit-repolist-status)

  ;; (add-hook 'magit-popup-mode-hook #'hide-mode-line-mode)
  ;; (set! :popup "^.*magit" '((slot . -1) (side . right) (size . 80)) '((modeline . nil) (select . t)))
  ;; (set! :popup "^\\*magit.*popup\\*" '((slot . 0) (side . right)) '((modeline . nil) (select . t)))
  ;; (set! :popup "^.*magit-revision:.*" '((slot . 2) (side . right) (window-height . 0.6)) '((modeline . nil) (select . t)))
  ;; (set! :popup "^.*magit-diff:.*" '((slot . 2) (side . right) (window-height . 0.6)) '((modeline . nil) (select . nil)))

  (after! evil
    ;; Switch to emacs state only while in `magit-blame-mode', then back when
    ;; its done (since it's a minor-mode).
    (add-hook! 'magit-blame-mode-hook
      (evil-local-mode (if magit-blame-mode -1 +1)))))


(def-package! magit-blame
  :commands magit-blame
  :after git-timemachine)


(def-package! magithub
  :commands (magithub-clone magithub-feature-autoinject)
  :after magit
  :config
  (load "magithub-autoloads" nil t)
  (magithub-feature-autoinject t)
  (setq magithub-dir (concat doom-etc-dir "magithub/")
        magithub-clone-default-directory "~/"
        magithub-preferred-remote-method 'clone_url))


(def-package! evil-magit
  :when (featurep! :feature evil)
  :after magit
  :config
  (setq evil-magit-state 'normal))<commit_msg>tools/magit: initialize magithub variables sooner<commit_after>;;; tools/magit/config.el -*- lexical-binding: t; -*-

(def-package! magit
  :defer t
  :init
  (load "magit-autoloads" nil t)
  :config
  (set! :popup "^\\*?magit" :ignore)

  (map! :map magit-repolist-mode-map
        :n "j" #'next-line
        :n "k" #'previous-line
        :n "s" #'magit-repolist-status)

  ;; (add-hook 'magit-popup-mode-hook #'hide-mode-line-mode)
  ;; (set! :popup "^.*magit" '((slot . -1) (side . right) (size . 80)) '((modeline . nil) (select . t)))
  ;; (set! :popup "^\\*magit.*popup\\*" '((slot . 0) (side . right)) '((modeline . nil) (select . t)))
  ;; (set! :popup "^.*magit-revision:.*" '((slot . 2) (side . right) (window-height . 0.6)) '((modeline . nil) (select . t)))
  ;; (set! :popup "^.*magit-diff:.*" '((slot . 2) (side . right) (window-height . 0.6)) '((modeline . nil) (select . nil)))

  (after! evil
    ;; Switch to emacs state only while in `magit-blame-mode', then back when
    ;; its done (since it's a minor-mode).
    (add-hook! 'magit-blame-mode-hook
      (evil-local-mode (if magit-blame-mode -1 +1)))))


(def-package! magit-blame
  :commands magit-blame
  :after git-timemachine)


(def-package! magithub
  :commands (magithub-clone magithub-feature-autoinject)
  :after magit
  :init
  (setq magithub-dir (concat doom-etc-dir "magithub/")
        magithub-clone-default-directory "~/"
        magithub-preferred-remote-method 'clone_url)
  :config
  (load "magithub-autoloads" nil t)
  (magithub-feature-autoinject t))


(def-package! evil-magit
  :when (featurep! :feature evil)
  :after magit
  :config
  (setq evil-magit-state 'normal))
{'fraction_non_alphanumeric': 0.20164734594264797, 'fraction_numerical': 0.007321537522879805, 'mean_word_length': 3.1141781681304894, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4414116', 'n_tokens_mistral': 1320, 'n_tokens_neox': 1259, 'n_words': 302}