Disable automatic filename completion in most modes

This commit is contained in:
Alexander Rosenberg 2024-03-18 03:19:53 -07:00
parent 4513dfed7f
commit b517f722b2
Signed by: Zander671
GPG Key ID: 5FD0394ADBD72730

19
init.el
View File

@ -411,14 +411,14 @@ visual states."
(use-package cape
:bind (("C-c p" . cape-dabbrev)
([remap dabbrev-expand] . cape-dabbrev)
("C-c P" . cape-line))
("C-c P" . cape-line)
("C-c f" . cape-file))
:hook (text-mode . my/-cape-setup-text-mode)
:init
(defun my/-cape-setup-text-mode ()
(setq-local completion-at-point-functions
'(cape-dict cape-dabbrev)
corfu-auto nil))
(add-to-list 'completion-at-point-functions #'cape-file))
corfu-auto nil)))
;; xref
(use-package xref
@ -782,6 +782,14 @@ COMMAND and COMINT are like `compile'."
:innermodes '(my/poly-php-innermode))
(add-to-list 'auto-mode-alist '("\\.php\\|\\.phtml\\'" . my/poly-web-mode)))
;; shell-mode
(use-package sh-script
:ensure nil
:hook (sh-mode . my/-setup-sh-mode)
:init
(defun my/-setup-sh-mode ()
(add-to-list 'completion-at-point-functions #'cape-file)))
;; go mode
(use-package go-mode
:defer nil)
@ -917,6 +925,11 @@ Take directly from doom-modeline."
(use-package sage-shell-mode
:demand
:bind ("C-c g" . my/run-sage)
:hook (sage-shell-mode . my/-setup-sage-shell-mode)
:init
(defun my/-setup-sage-shell-mode ()
(setq-local comint-dynamic-complete-functions
'(comint-c-a-p-replace-by-expanded-history)))
:config
(defun my/run-sage (p)
"Like `sage-shell:run-sage', but does not ask anything without a prefix