commit 80e3c6e981fe5dcdb52d802d92da4bf921fa0e8b
parent b6d1b6132ab0b5895b6cc795c3ece7d2b522c1cb
Author: Gabriel G. de Brito <me@gboncoffee.dev.br>
Date: Wed, 25 Mar 2026 11:48:35 -0300
Consult directory/revert buffers.
Diffstat:
1 file changed, 39 insertions(+), 5 deletions(-)
diff --git a/emacs/config.org b/emacs/config.org
@@ -126,6 +126,12 @@ Move custom elsewhere.
(load custom-file 'noerror)
#+END_SRC
+Revert buffers when content changed.
+
+#+BEGIN_SRC emacs-lisp
+(global-auto-revert-mode 1)
+#+END_SRC
+
*** Compile mode
No default command a keybind, colorize the buffer.
@@ -145,7 +151,7 @@ No default command a keybind, colorize the buffer.
#'colorize-compilation)
#+END_SRC
-*** Minibuffer completion
+*** Minibuffer
Makes the minibuffer much nicer.
@@ -153,6 +159,20 @@ Makes the minibuffer much nicer.
(use-package vertico
:init (vertico-mode))
+(use-package vertico-directory
+ :after vertico
+ :ensure nil
+ :bind (:map vertico-map
+ ("RET" . vertico-directory-enter)
+ ("DEL" . vertico-directory-delete-char)
+ ("M-DEL" . vertico-directory-delete-word))
+ :hook (rfn-eshadow-update-overlay . vertico-directory-tidy))
+
+(use-package vertico-mouse
+ :after vertico
+ :ensure nil
+ :init (vertico-mouse-mode 1))
+
(use-package orderless
:init
(setq completion-styles '(orderless basic))
@@ -160,15 +180,11 @@ Makes the minibuffer much nicer.
(setq completion-category-overrides
'((file (styles basic partial-completion)))))
-(use-package consult
- :after vertico)
-
(use-package marginalia
:init (marginalia-mode))
#+END_SRC
*** Windows
-
Move windows with meta. Makes C-v and M-v to move by half pages instead of
full ones.
@@ -190,6 +206,24 @@ full ones.
(global-set-key (kbd "M-v") #'scroll-down-half)
#+END_SRC
+*** Consult
+Makes it easy to search anything.
+
+#+BEGIN_SRC emacs-lisp
+(use-package consult
+ :after vertico
+ :bind (
+ ("C-x b" . consult-buffer)
+ ("M-y" . consult-yank-from-kill-ring)
+ ("M-g M-g" . consult-goto-line)
+ ("C-s" . consult-line)
+ ("C-c /" . consult-grep))
+ :config
+ (setq xref-show-xrefs-function #'consult-xref
+ xref-show-definitions-function #'consult-xref))
+
+#+END_SRC
+
** Editor configuration
*** Basics