Disable automatic filename completion in most modes
This commit is contained in:
parent
4513dfed7f
commit
b517f722b2
19
init.el
19
init.el
@ -411,14 +411,14 @@ visual states."
|
|||||||
(use-package cape
|
(use-package cape
|
||||||
:bind (("C-c p" . cape-dabbrev)
|
:bind (("C-c p" . cape-dabbrev)
|
||||||
([remap dabbrev-expand] . 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)
|
:hook (text-mode . my/-cape-setup-text-mode)
|
||||||
:init
|
:init
|
||||||
(defun my/-cape-setup-text-mode ()
|
(defun my/-cape-setup-text-mode ()
|
||||||
(setq-local completion-at-point-functions
|
(setq-local completion-at-point-functions
|
||||||
'(cape-dict cape-dabbrev)
|
'(cape-dict cape-dabbrev)
|
||||||
corfu-auto nil))
|
corfu-auto nil)))
|
||||||
(add-to-list 'completion-at-point-functions #'cape-file))
|
|
||||||
|
|
||||||
;; xref
|
;; xref
|
||||||
(use-package xref
|
(use-package xref
|
||||||
@ -782,6 +782,14 @@ COMMAND and COMINT are like `compile'."
|
|||||||
:innermodes '(my/poly-php-innermode))
|
:innermodes '(my/poly-php-innermode))
|
||||||
(add-to-list 'auto-mode-alist '("\\.php\\|\\.phtml\\'" . my/poly-web-mode)))
|
(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
|
;; go mode
|
||||||
(use-package go-mode
|
(use-package go-mode
|
||||||
:defer nil)
|
:defer nil)
|
||||||
@ -917,6 +925,11 @@ Take directly from doom-modeline."
|
|||||||
(use-package sage-shell-mode
|
(use-package sage-shell-mode
|
||||||
:demand
|
:demand
|
||||||
:bind ("C-c g" . my/run-sage)
|
: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
|
:config
|
||||||
(defun my/run-sage (p)
|
(defun my/run-sage (p)
|
||||||
"Like `sage-shell:run-sage', but does not ask anything without a prefix
|
"Like `sage-shell:run-sage', but does not ask anything without a prefix
|
||||||
|
Loading…
Reference in New Issue
Block a user