From b88757dde32d90e2b6ad7309962ab177d1dbb027 Mon Sep 17 00:00:00 2001 From: Evie Litherland-Smith Date: Wed, 19 Jun 2024 08:35:50 +0100 Subject: [PATCH] Fix consult remapping Move package specific remapping to their own use-package block Add esh-mode and explicitly require in eshell config to fix remapping eshell-previous-matching-input --- init.el | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/init.el b/init.el index ce46ce7..80c3cd6 100644 --- a/init.el +++ b/init.el @@ -167,12 +167,22 @@ (use-package avy :bind ((" " . avy-goto-char))) +(use-package comint + :bind ( :map comint-mode-map + (" " . consult-history))) + (use-package shell :bind (("C-c t s" . shell))) (use-package eshell + :bind (("C-c t e" . eshell)) + :config + (require 'esh-mode)) + +(use-package esh-mode :defines eshell-mode-map - :bind (("C-c t e" . eshell))) + :bind ( :map eshell-mode-map + (" " . consult-history))) (use-package calc :bind (("" . calc))) @@ -370,6 +380,9 @@ (use-package org :defines org-mode-map :hook ((org-mode . turn-on-auto-fill)) + :bind ( :map org-mode-map + (" " . consult-org-heading) + (" " . consult-org-heading)) :custom (org-directory "~/Documents/org") (org-default-notes-file (expand-file-name "notes.org" org-directory)) @@ -743,6 +756,8 @@ (cape-dabbrev-min-length (+ corfu-auto-prefix 1))) (use-package consult + :functions (consult-org-heading + consult-history) :bind ((" " . consult-imenu) (" " . consult-buffer) (" " . consult-project-buffer) @@ -752,15 +767,8 @@ ("C-c s g" . consult-ripgrep) ("C-c s e" . consult-flymake) ("C-c s i" . consult-info) - :map org-mode-map - (" " . consult-org-heading) - (" " . consult-org-heading) :map minibuffer-local-map - (" " . consult-history) - :map comint-mode-map - (" " . consult-history) - :map eshell-mode-map - (" " . consult-history))) + (" " . consult-history))) (use-package consult-eglot :after (consult eglot)