Disable corfu-auto in eshell, shell, and gud
This commit is contained in:
parent
2e97f41105
commit
2243ad8816
25
README.org
25
README.org
|
@ -977,27 +977,10 @@ Set treesit to fontify all elements, default was 3 (out of 4)
|
|||
(corfu-mode +1)))
|
||||
(add-hook 'minibuffer-setup-hook #'corfu-enable-always-in-minibuffer 1)
|
||||
|
||||
(add-hook 'eshell-mode-hook
|
||||
(lambda ()
|
||||
(setq-local corfu-auto nil
|
||||
corfu-auto-commands nil)
|
||||
(corfu-mode)))
|
||||
|
||||
(add-hook 'gud-mode-hook
|
||||
(lambda ()
|
||||
(setq-local corfu-auto nil
|
||||
corfu-auto-commands nil)
|
||||
(corfu-mode)))
|
||||
|
||||
(defun corfu-send-shell (&rest _)
|
||||
"Send completion candidate when inside comint/eshell."
|
||||
(cond
|
||||
((and (derived-mode-p 'eshell-mode) (fboundp 'eshell-send-input))
|
||||
(eshell-send-input))
|
||||
((and (derived-mode-p 'comint-mode) (fboundp 'comint-send-input))
|
||||
(comint-send-input))))
|
||||
|
||||
(advice-add #'corfu-insert :after #'corfu-send-shell))
|
||||
(defun my/local-corfu-no-auto () (setq-local corfu-auto nil))
|
||||
(with-eval-after-load 'eshell (add-hook 'eshell-mode-hook 'my/local-corfu-no-auto))
|
||||
(with-eval-after-load 'shell (add-hook 'shell-mode-hook 'my/local-corfu-no-auto))
|
||||
(with-eval-after-load 'gud (add-hook 'gud-mode-hook 'my/local-corfu-no-auto)))
|
||||
|
||||
(use-package cape
|
||||
:ensure t
|
||||
|
|
Loading…
Reference in a new issue