fix(init-ai): prevent unwanted autocompletion in agent-shell
This commit is contained in:
@@ -229,13 +229,18 @@ content do not break gptel-magit."
|
||||
(setq agent-shell-transcript-file-path-function nil)
|
||||
(setq shell-maker-prompt-before-killing-buffer nil)
|
||||
|
||||
;; Quitar cape-dabbrev y cape-history de agent-shell (evita autocompletar texto del buffer)
|
||||
;; Quitar cape-dabbrev, cape-history, comint-completion-at-point y el centinela t
|
||||
;; de agent-shell (evita autocompletar texto del buffer o historial de prompts previos)
|
||||
(add-hook 'agent-shell-mode-hook
|
||||
(lambda ()
|
||||
(remove-hook 'completion-at-point-functions #'cape-dabbrev t)
|
||||
(remove-hook 'completion-at-point-functions #'cape-history t)
|
||||
(remove-hook 'completion-at-point-functions #'comint-completion-at-point t)
|
||||
(setq-local completion-at-point-functions
|
||||
(seq-remove (lambda (fn)
|
||||
(memq fn '(cape-dabbrev cape-history)))
|
||||
completion-at-point-functions)))))
|
||||
(delq t completion-at-point-functions))
|
||||
(setq-local corfu-auto nil))
|
||||
t) ;; :append para correr DESPUÉS de que agent-shell configure sus CAPFs
|
||||
)
|
||||
|
||||
(provide 'init-ai)
|
||||
;;; init-ai.el ends here
|
||||
|
||||
Reference in New Issue
Block a user