more lazy loading
This commit is contained in:
parent
4ca76053d2
commit
0d05811bc7
|
|
@ -12,29 +12,30 @@
|
|||
|
||||
(pkg/require 'consult-projectile)
|
||||
|
||||
(defun my-consult-projectile-find-file ()
|
||||
"Use consult-projectile-find-file, consult-find-file outside of project."
|
||||
(interactive)
|
||||
(if (projectile-project-p)
|
||||
(consult-projectile-find-file)
|
||||
(consult-projectile)))
|
||||
(with-eval-after-load 'consult-projectile
|
||||
(defun my-consult-projectile-find-file ()
|
||||
"Use consult-projectile-find-file, consult-find-file outside of project."
|
||||
(interactive)
|
||||
(if (projectile-project-p)
|
||||
(consult-projectile-find-file)
|
||||
(consult-projectile)))
|
||||
|
||||
(pkg/with-eval-after-load
|
||||
(consult projectile)
|
||||
|
||||
(advice-add 'projectile-find-file :override #'consult-projectile-find-file)
|
||||
(advice-add 'projectile-find-dir :override #'consult-projectile-find-dir)
|
||||
(advice-add 'projectile-switch-to-buffer :override #'consult-projectile-switch-to-buffer)
|
||||
(advice-add 'projectile-switch-project :override #'consult-projectile-switch-project))
|
||||
(pkg/with-eval-after-load
|
||||
(consult projectile)
|
||||
|
||||
(advice-add 'projectile-find-file :override #'consult-projectile-find-file)
|
||||
(advice-add 'projectile-find-dir :override #'consult-projectile-find-dir)
|
||||
(advice-add 'projectile-switch-to-buffer :override #'consult-projectile-switch-to-buffer)
|
||||
(advice-add 'projectile-switch-project :override #'consult-projectile-switch-project))
|
||||
|
||||
(global-set-key (kbd "C-x p") projectile-command-map)
|
||||
(define-key projectile-command-map (kbd "f") #'consult-projectile-find-file)
|
||||
(define-key projectile-command-map (kbd "d") #'consult-projectile-find-dir)
|
||||
(define-key projectile-command-map (kbd "b") #'consult-projectile-switch-to-buffer)
|
||||
(define-key projectile-command-map (kbd "s") #'consult-projectile-switch-project)
|
||||
(define-key projectile-command-map (kbd "p") #'consult-projectile)
|
||||
(define-key projectile-command-map (kbd "/") #'consult-ripgrep)
|
||||
(define-key projectile-command-map (kbd "f") #'my-consult-projectile-find-file)
|
||||
(global-set-key (kbd "C-x p") projectile-command-map)
|
||||
(define-key projectile-command-map (kbd "f") #'consult-projectile-find-file)
|
||||
(define-key projectile-command-map (kbd "d") #'consult-projectile-find-dir)
|
||||
(define-key projectile-command-map (kbd "b") #'consult-projectile-switch-to-buffer)
|
||||
(define-key projectile-command-map (kbd "s") #'consult-projectile-switch-project)
|
||||
(define-key projectile-command-map (kbd "p") #'consult-projectile)
|
||||
(define-key projectile-command-map (kbd "/") #'consult-ripgrep)
|
||||
(define-key projectile-command-map (kbd "f") #'my-consult-projectile-find-file))
|
||||
|
||||
(provide 'module-consult-projectile)
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
(require 'module-pkg)
|
||||
|
||||
(pkg/require 'graphviz-dot-mode)
|
||||
(pkg/require-defer 'graphviz-dot-mode)
|
||||
|
||||
(with-eval-after-load 'org
|
||||
(org-babel-do-load-languages
|
||||
|
|
|
|||
|
|
@ -8,56 +8,58 @@
|
|||
|
||||
(require 'module-pkg)
|
||||
|
||||
(pkg/require 'magit)
|
||||
(pkg/require-defer 'magit)
|
||||
|
||||
(setq magit-display-buffer-function
|
||||
#'magit-display-buffer-same-window-except-diff-v1)
|
||||
(with-eval-after-load 'magit
|
||||
|
||||
;; git reset --soft $(git merge-base branch1 branch2)
|
||||
(defun magit-reset-to-merge-base ()
|
||||
"Reset to merge-base of two branches using Magit's branch selection."
|
||||
(interactive)
|
||||
(require 'magit)
|
||||
(let* ((branch1 (magit-read-branch "Select first branch: "))
|
||||
(branch2 (magit-read-branch "Select second branch: "))
|
||||
(merge-base (magit-git-string "merge-base" branch1 branch2)))
|
||||
(if merge-base
|
||||
(progn
|
||||
(magit-reset-internal "--soft" merge-base)
|
||||
(message "Reset to merge-base of %s and %s" branch1 branch2))
|
||||
(user-error "No merge-base found between %s and %s" branch1 branch2))))
|
||||
(setq magit-display-buffer-function
|
||||
#'magit-display-buffer-same-window-except-diff-v1)
|
||||
|
||||
;; git reset --soft @{u}
|
||||
(defun magit-reset-to-upstream ()
|
||||
"Reset to upstream of the current branch using Magit."
|
||||
(interactive)
|
||||
(require 'magit)
|
||||
(let ((current-branch (magit-get-current-branch)))
|
||||
(if current-branch
|
||||
(let ((upstream (magit-get-upstream-branch current-branch)))
|
||||
(if upstream
|
||||
(progn
|
||||
(magit-reset-internal "--soft" "@{u}")
|
||||
(message "Reset to upstream of %s (%s)" current-branch upstream))
|
||||
(user-error "No upstream branch set for %s" current-branch)))
|
||||
(user-error "Not on a branch"))))
|
||||
;; git reset --soft $(git merge-base branch1 branch2)
|
||||
(defun magit-reset-to-merge-base ()
|
||||
"Reset to merge-base of two branches using Magit's branch selection."
|
||||
(interactive)
|
||||
(require 'magit)
|
||||
(let* ((branch1 (magit-read-branch "Select first branch: "))
|
||||
(branch2 (magit-read-branch "Select second branch: "))
|
||||
(merge-base (magit-git-string "merge-base" branch1 branch2)))
|
||||
(if merge-base
|
||||
(progn
|
||||
(magit-reset-internal "--soft" merge-base)
|
||||
(message "Reset to merge-base of %s and %s" branch1 branch2))
|
||||
(user-error "No merge-base found between %s and %s" branch1 branch2))))
|
||||
|
||||
(defvar my/magit-prefix-map (make-sparse-keymap))
|
||||
(define-key ctl-x-map "g" my/magit-prefix-map)
|
||||
(define-key my/magit-prefix-map "g" #'magit-status)
|
||||
(define-key my/magit-prefix-map "rb" #'magit-reset-to-merge-base)
|
||||
(define-key my/magit-prefix-map "ru" #'magit-reset-to-upstream)
|
||||
(define-key my/magit-prefix-map "ll" #'magit-log)
|
||||
(define-key my/magit-prefix-map "la" #'magit-log-all)
|
||||
(define-key my/magit-prefix-map "lf" #'magit-log-buffer-file)
|
||||
(define-key my/magit-prefix-map "Rs" #'magit-reset-soft)
|
||||
(define-key my/magit-prefix-map "Rh" #'magit-reset-hard)
|
||||
(define-key my/magit-prefix-map "!" #'magit-run)
|
||||
(define-key my/magit-prefix-map "bb" #'magit-branch)
|
||||
(define-key my/magit-prefix-map "bc" #'magit-branch-create)
|
||||
(define-key my/magit-prefix-map "bs" #'magit-branch-checkout)
|
||||
(define-key my/magit-prefix-map "mm" #'magit-merge)
|
||||
(define-key my/magit-prefix-map "dd" #'magit-diff)
|
||||
;; git reset --soft @{u}
|
||||
(defun magit-reset-to-upstream ()
|
||||
"Reset to upstream of the current branch using Magit."
|
||||
(interactive)
|
||||
(require 'magit)
|
||||
(let ((current-branch (magit-get-current-branch)))
|
||||
(if current-branch
|
||||
(let ((upstream (magit-get-upstream-branch current-branch)))
|
||||
(if upstream
|
||||
(progn
|
||||
(magit-reset-internal "--soft" "@{u}")
|
||||
(message "Reset to upstream of %s (%s)" current-branch upstream))
|
||||
(user-error "No upstream branch set for %s" current-branch)))
|
||||
(user-error "Not on a branch"))))
|
||||
|
||||
(defvar my/magit-prefix-map (make-sparse-keymap))
|
||||
(define-key ctl-x-map "g" my/magit-prefix-map)
|
||||
(define-key my/magit-prefix-map "g" #'magit-status)
|
||||
(define-key my/magit-prefix-map "rb" #'magit-reset-to-merge-base)
|
||||
(define-key my/magit-prefix-map "ru" #'magit-reset-to-upstream)
|
||||
(define-key my/magit-prefix-map "ll" #'magit-log)
|
||||
(define-key my/magit-prefix-map "la" #'magit-log-all)
|
||||
(define-key my/magit-prefix-map "lf" #'magit-log-buffer-file)
|
||||
(define-key my/magit-prefix-map "Rs" #'magit-reset-soft)
|
||||
(define-key my/magit-prefix-map "Rh" #'magit-reset-hard)
|
||||
(define-key my/magit-prefix-map "!" #'magit-run)
|
||||
(define-key my/magit-prefix-map "bb" #'magit-branch)
|
||||
(define-key my/magit-prefix-map "bc" #'magit-branch-create)
|
||||
(define-key my/magit-prefix-map "bs" #'magit-branch-checkout)
|
||||
(define-key my/magit-prefix-map "mm" #'magit-merge)
|
||||
(define-key my/magit-prefix-map "dd" #'magit-diff))
|
||||
|
||||
(provide 'module-magit)
|
||||
|
||||
|
|
|
|||
|
|
@ -8,12 +8,13 @@
|
|||
|
||||
(require 'module-pkg)
|
||||
|
||||
(pkg/require 'plantuml-mode)
|
||||
(pkg/require-defer 'plantuml-mode)
|
||||
|
||||
(setq plantuml-default-exec-mode 'jar
|
||||
plantuml-jar-path "/usr/share/plantuml/plantuml.jar"
|
||||
org-plantuml-jar-path (expand-file-name
|
||||
"/usr/share/plantuml/plantuml.jar"))
|
||||
(with-eval-after-load 'plantuml-mode
|
||||
(setq plantuml-default-exec-mode 'jar
|
||||
plantuml-jar-path "/usr/share/plantuml/plantuml.jar"
|
||||
org-plantuml-jar-path (expand-file-name
|
||||
"/usr/share/plantuml/plantuml.jar")))
|
||||
|
||||
(with-eval-after-load 'org
|
||||
(org-babel-do-load-languages
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
;;; Code:
|
||||
|
||||
(require 'module-pkg)
|
||||
(pkg/require 'elfeed)
|
||||
(pkg/require-defer 'elfeed)
|
||||
|
||||
(provide 'module-rss)
|
||||
;;; module-rss.el ends here.
|
||||
|
|
|
|||
Loading…
Reference in New Issue