From 38c3cc67f93c9c78849bc707fa60184485c3616b Mon Sep 17 00:00:00 2001 From: Thanos Apollo Date: Sat, 9 Sep 2023 21:00:05 +0300 Subject: devtools.el: Add thanos/consult-register map --- .emacs.d/modules/thanos-devtools.el | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to '.emacs.d/modules') diff --git a/.emacs.d/modules/thanos-devtools.el b/.emacs.d/modules/thanos-devtools.el index 111e8c7..b24e92c 100644 --- a/.emacs.d/modules/thanos-devtools.el +++ b/.emacs.d/modules/thanos-devtools.el @@ -62,6 +62,18 @@ (define-key global-map (kbd "C-x r .") 'consult-register) (define-key corfu-map (kbd "RET") nil) ;; Leave my enter alone +(define-prefix-command 'thanos/consult-register) +(define-key global-map (kbd "C-c r") 'thanos/consult-register) +(define-key thanos/consult-register (kbd ".") 'consult-register) +(define-key thanos/consult-register (kbd "s") 'consult-register-store) + +(setf register-preview-delay 0.5 + register-preview-function #'consult-register-format) + +;; xref +(setf xref-show-xrefs-function #'consult-xref + xref-show-definitions-function #'consult-xref) + (defun insert-brackets (&optional arg) "Insert brackets." (interactive "P") -- cgit v1.2.3