How can I make Dabbrev and Corfu automatically show a pop-up for the words from my current buffer? For example, if I write "example" somewhere in a document, I would like it pops up automatically when I start writing "exa". I have Corfu-global-mode corfu-pop-up mode and Corfu-history enabled.
However, this popup suggestion works perfectly on org-mode! For any other modes, it just does not work. It would be very helpful to get it to work for other modes, especially for Latex mode and Python mode!
Please let me know. Thanks a lot for your help.
Here is my config for corfu:
(use-package corfu
:custom
(corfu-cycle t) ; Allows cycling through candidates
(corfu-auto t) ; Enable auto completion
(corfu-auto-prefix 2)
(corfu-auto-delay 0.1)
(corfu-popupinfo-delay '(0.4 . 0.2))
(corfu-preview-current 'insert) ; Do not preview current candidate
(corfu-preselect-first nil)
(corfu-on-exact-match nil) ; Don't auto expand tempel snippets
:bind (:map corfu-map
("M-SPC" . corfu-insert-separator)
("TAB" . corfu-next)
([tab] . corfu-next)
("S-TAB" . corfu-previous)
([backtab] . corfu-previous)
("S-<return>" . nil) ;; leave my entry as it is
("RET" . corfu-insert))
:init
(global-corfu-mode)
(corfu-history-mode)
(corfu-popupinfo-mode) ; Popup completion info
)
(add-hook 'tex-mode-hook #'corfu-mode)
(add-hook 'LaTeX-mode-hook #'corfu-mode)