mirror of
https://codeberg.org/scip/dot-emacs.git
synced 2026-08-23 21:24:18 +02:00
add gitswitch and git repo list to consult-buffer, do: g SPC
This commit is contained in:
@@ -212,7 +212,6 @@ targets."
|
||||
(consult-widen-key ">")
|
||||
|
||||
:config
|
||||
|
||||
(when (fboundp 'persp-new)
|
||||
(consult-customize consult--source-buffer :hidden t :default nil)
|
||||
|
||||
@@ -224,7 +223,21 @@ targets."
|
||||
:default t
|
||||
:items #'persp-get-buffer-names))
|
||||
|
||||
(push consult--source-perspective consult-buffer-sources)))
|
||||
(push consult--source-perspective consult-buffer-sources))
|
||||
|
||||
|
||||
(defvar git-source
|
||||
(list :name "Git Repo"
|
||||
:category 'consult-location
|
||||
:narrow ?g
|
||||
:face 'consult-buffer
|
||||
:history 'buffer-name-history
|
||||
:state #'consult--buffer-state
|
||||
:sort t
|
||||
:action #'tvd-switch-to-repo
|
||||
:items #'tvd-list-git-repos))
|
||||
|
||||
(add-to-list 'consult-buffer-sources 'git-source 'append))
|
||||
|
||||
;; needs to be defined outside
|
||||
(defalias 'rg 'consult-ripgrep)
|
||||
@@ -273,7 +286,7 @@ targets."
|
||||
([backtab] . corfu-previous)))
|
||||
|
||||
|
||||
;; much better experience to seach current buffer consult-line would
|
||||
;; much better experience to seach current buffer, consult-line would
|
||||
;; do the job as well and looks similar, but I'm used to swiper, so
|
||||
;; stick with it.
|
||||
(use-package swiper
|
||||
|
||||
Reference in New Issue
Block a user