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
This commit is contained in:
Evie Litherland-Smith 2024-06-19 08:35:50 +01:00
parent 48b3d621f3
commit b88757dde3

26
init.el
View file

@ -167,12 +167,22 @@
(use-package avy
:bind (("<remap> <goto-char>" . avy-goto-char)))
(use-package comint
:bind ( :map comint-mode-map
("<remap> <comint-history-isearch-backward-regexp>" . 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
("<remap> <eshell-previous-matching-input>" . consult-history)))
(use-package calc
:bind (("<Calculator>" . calc)))
@ -370,6 +380,9 @@
(use-package org
:defines org-mode-map
:hook ((org-mode . turn-on-auto-fill))
:bind ( :map org-mode-map
("<remap> <imenu>" . consult-org-heading)
("<remap> <org-goto>" . 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 (("<remap> <imenu>" . consult-imenu)
("<remap> <switch-to-buffer>" . consult-buffer)
("<remap> <project-switch-to-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
("<remap> <imenu>" . consult-org-heading)
("<remap> <org-goto>" . consult-org-heading)
:map minibuffer-local-map
("<remap> <previous-matching-history-element>" . consult-history)
:map comint-mode-map
("<remap> <comint-history-isearch-backward-regexp>" . consult-history)
:map eshell-mode-map
("<remap> <eshell-previous-matching-input>" . consult-history)))
("<remap> <previous-matching-history-element>" . consult-history)))
(use-package consult-eglot
:after (consult eglot)