OutsideNo1877 · 2022-09-25 16:59
So im fairly new to emacs and have been trying to get corfu to work for autocompletion the issue is it just doesn’t seem to do anything at all it never displays completions most of the time and I don’t know why
(use-package corfu
:ensure t
:custom
(corfu-auto t)
:init
(global-corfu-mode)
(use-package emacs
:init
(setq completion-cycle-threshold 3))
In el file for instance if i manually invoke completion at point a little pop up shows up and completions works fine but it won’t autocomplete
Also another thing how do i get completion at point in a org file because since im in org mode the lisp completions don’t show up when manually invoked probably since im in org mode
franburstall · 2022-09-25 17:23
I think you want to put `global-corfu-mode` under `:config` rather than `:init`. The latter fires before the package is loaded.
OutsideNo1877 · 2022-09-25 17:28
No it still doesn’t work and the official documentation says that im supposed to use init for that since i just checked
takutekato · 2022-09-25 18:38
did you type at least `corfu-min-chars` (or something like that)? Personally I decrease it to 1 so that the completion pops up as soon as I type a single letter.
titanofold · 2022-09-25 19:40
It's `corfu-auto-prefix` that controls the appearance of the corfu ui.
The default is 3 characters before it shows completions.
titanofold · 2022-09-25 19:42
When editing a code block in Org mode, with your point in the code block use `C-c '`. This will open a child buffer with the elisp major mode and will offer elisp completions rather than Org completions.
OutsideNo1877 · 2022-09-25 20:13
It seems to be working for el files at least now im going to try to set it up with eglot
OutsideNo1877 · 2022-09-25 20:14
Thank you bro
titanofold · 2022-09-25 20:15
If you're not already looking at it, this may be useful:
https://github.com/minad/corfu/wiki#configuring-corfu-for-eglot
OutsideNo1877 · 2022-09-25 21:33
It actually works really easy with eglot unfortunately snippets don’t seem to work easily with corfu