mirror of
https://codeberg.org/scip/dot-emacs.git
synced 2025-12-17 04:20:57 +01:00
added savehist and perspective support to consult-buffer
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -19,3 +19,4 @@ tramp
|
|||||||
eln-cache
|
eln-cache
|
||||||
bookmarks
|
bookmarks
|
||||||
.lsp-session-v1
|
.lsp-session-v1
|
||||||
|
history
|
||||||
|
|||||||
@@ -102,13 +102,31 @@ via [[http://whattheemacsd.com/setup-ido.el-02.html][whattheemacs.d]]"
|
|||||||
--with-filename --line-number -I -r -A1 -B1")
|
--with-filename --line-number -I -r -A1 -B1")
|
||||||
|
|
||||||
:config
|
:config
|
||||||
(defalias 'egrep 'consult-grep))
|
(defalias 'egrep 'consult-grep)
|
||||||
|
|
||||||
|
(when (fboundp 'persp-new)
|
||||||
|
(consult-customize consult--source-buffer :hidden t :default nil)
|
||||||
|
|
||||||
|
(defvar consult--source-perspective
|
||||||
|
(list :name "Perspective"
|
||||||
|
:narrow ?s
|
||||||
|
:category 'buffer
|
||||||
|
:state #'consult--buffer-state
|
||||||
|
:default t
|
||||||
|
:items #'persp-get-buffer-names))
|
||||||
|
|
||||||
|
(push consult--source-perspective consult-buffer-sources)))
|
||||||
|
|
||||||
|
|
||||||
(use-package
|
(use-package
|
||||||
embark-consult
|
embark-consult
|
||||||
:after (embark consult))
|
:after (embark consult))
|
||||||
|
|
||||||
|
;; Persist history over Emacs restarts. Vertico sorts by history position.
|
||||||
|
(use-package savehist
|
||||||
|
:ensure nil ; builtin
|
||||||
|
:init
|
||||||
|
(savehist-mode))
|
||||||
|
|
||||||
;; test, replace isearch-forward-regexp first only.
|
;; test, replace isearch-forward-regexp first only.
|
||||||
;; dir: ivy/
|
;; dir: ivy/
|
||||||
|
|||||||
Reference in New Issue
Block a user