diff --git a/init.el b/init.el index 45f12b0..72ef3d9 100644 --- a/init.el +++ b/init.el @@ -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