|
20 | 20 | ;; `global-corfu-modes' to exclude certain modes. |
21 | 21 | (global-corfu-mode) |
22 | 22 |
|
23 | | - :custom |
| 23 | + :config |
24 | 24 | ;; disable popup in eshell mode |
25 | 25 | (add-hook 'eshell-mode-hook |
26 | 26 | (lambda () |
27 | 27 | (setq-local corfu-auto nil) |
28 | | - (corfu-mode))) |
| 28 | + (setq-local completion-styles '(basic)))) |
| 29 | + |
| 30 | + ;; Only useful in elisp, but it's global ... test if breaks anything? |
| 31 | + ;; (corfu-echo-mode) |
| 32 | + |
| 33 | + ;; corfu+eglot seems to be broken in python shell |
| 34 | + ;; returning broken candidates __0_dummy_completion__, inserted by python-mode |
| 35 | + (add-hook 'inferior-python-mode-hook |
| 36 | + (lambda () |
| 37 | + (setq-local completion-styles '(basic)))) |
| 38 | + |
| 39 | + ;; Option to move completion to minibuffer when corfu is active |
| 40 | + ;; https://github.com/minad/corfu#transfer-completion-to-the-minibuffer |
| 41 | + (defun corfu-move-to-minibuffer () |
| 42 | + (interactive) |
| 43 | + (pcase completion-in-region--data |
| 44 | + (`(,beg ,end ,table ,pred ,extras) |
| 45 | + (let ((completion-extra-properties extras) |
| 46 | + completion-cycle-threshold completion-cycling) |
| 47 | + (consult-completion-in-region beg end table pred))))) |
| 48 | + (keymap-set corfu-map "M-m" #'corfu-move-to-minibuffer) |
| 49 | + (add-to-list 'corfu-continue-commands #'corfu-move-to-minibuffer) |
29 | 50 |
|
| 51 | + :custom |
30 | 52 | ;; Disable indentation+completion using the TAB key. |
31 | 53 | (tab-always-indent t) |
32 | 54 |
|
|
40 | 62 | (read-extended-command-predicate #'command-completion-default-include-p) |
41 | 63 | ) |
42 | 64 |
|
| 65 | +;; Emacs 30 and newer: Disable Ispell completion function. |
| 66 | +;; Try `cape-dict' as an alternative. |
| 67 | +(setq text-mode-ispell-word-completion nil) |
| 68 | + |
| 69 | +;; New inline preview in emacs 30 |
| 70 | +;; https://www.masteringemacs.org/article/whats-new-in-emacs-301 |
| 71 | +(use-package completion-preview |
| 72 | + :ensure nil |
| 73 | + ) |
| 74 | + |
43 | 75 |
|
44 | 76 | (use-package hippie-exp |
45 | 77 | :ensure nil |
|
0 commit comments