summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorCase Duckworth2021-04-02 14:42:15 -0500
committerCase Duckworth2021-04-02 14:42:15 -0500
commit1dedc6df5d1b5ca9a9c9ccaae65ed4dd884ff979 (patch)
tree8b64e2118b413f27d2fb82867e26eeb0f3dfccc4
parentRemove `:acdw/map' from `setup' (diff)
downloademacs-1dedc6df5d1b5ca9a9c9ccaae65ed4dd884ff979.tar.gz
emacs-1dedc6df5d1b5ca9a9c9ccaae65ed4dd884ff979.zip
Advise split-window- functions to prompt for a buffer
-rw-r--r--init.el21
1 files changed, 20 insertions, 1 deletions
diff --git a/init.el b/init.el index 2a814c4..b42df7e 100644 --- a/init.el +++ b/init.el
@@ -186,6 +186,16 @@
186 (append recentf-exclude) acdw/dir) 186 (append recentf-exclude) acdw/dir)
187 (recentf-mode +1)) 187 (recentf-mode +1))
188 188
189;;;; Windows
190(winner-mode +1)
191
192;; Advise window-splitting to select a buffer afterword
193(dolist (func '(split-window-below
194 split-window-right
195 split-window-vertically
196 split-window-horizontally))
197 (advice-add func :after #'switch-to-buffer))
198
189;;;; Minibuffer 199;;;; Minibuffer
190(setc minibuffer-prompt-properties 200(setc minibuffer-prompt-properties
191 '(read-only t cursor-intangible t face minibuffer-prompt) 201 '(read-only t cursor-intangible t face minibuffer-prompt)
@@ -391,6 +401,7 @@
391 attempt-stack-overflow-recovery nil 401 attempt-stack-overflow-recovery nil
392 attempt-orderly-shutdown-on-fatal-signal nil 402 attempt-orderly-shutdown-on-fatal-signal nil
393 find-function-C-source-directory 403 find-function-C-source-directory
404 window-resize-pixelwise t
394 (pcase acdw/system 405 (pcase acdw/system
395 (:work (expand-file-name (concat "~/src/emacs-" 406 (:work (expand-file-name (concat "~/src/emacs-"
396 emacs-version 407 emacs-version
@@ -583,7 +594,15 @@ if ripgrep is installed, otherwise `consult-grep'."
583 xref-show-definitions-function #'consult-xref) 594 xref-show-definitions-function #'consult-xref)
584 595
585 ;; Projects 596 ;; Projects
586 (:option consult-project-root-function #'vc-root-dir)) 597 (:option consult-project-root-function #'vc-root-dir)
598
599 ;; Advise `split-window-'* functions
600 (dolist (func '(split-window-below
601 split-window-right
602 split-window-vertically
603 split-window-horizontally))
604 (advice-remove func #'switch-to-buffer)
605 (advice-add func :after #'consult-buffer)))
587 606
588;;;;; Marginalia 607;;;;; Marginalia
589(setup (:straight marginalia) 608(setup (:straight marginalia)