Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Corfu extension not found in commands list #299

Closed
aadi58002 opened this issue Feb 16, 2023 · 5 comments
Closed

Corfu extension not found in commands list #299

aadi58002 opened this issue Feb 16, 2023 · 5 comments

Comments

@aadi58002
Copy link

aadi58002 commented Feb 16, 2023

Problem

Corfu extensions like corfu-indexed-mode , corfu-history-mode, corfu-popupinfo-mode non of the command loaded into emacs.

We maintain small extension packages to Corfu in this repository in the subdirectory [extensions/](https://github.com/minad >/corfu/tree/main/extensions). The extensions are installed together with Corfu if you pull the package from ELPA. The >extensions are inactive by default and can be enabled manually if desired. Furthermore it is possible to install all of the files >separately, both corfu.el and the corfu-*.el extensions. Currently the following extensions come with the Corfu ELPA package:

In this paragraph it meantions that we can enable it manually unless i have not understood it correctly we should be able to enable this from the commands list as modes

Screenshot_20230216_170728

Emacs info

GNU Emacs 30.0.50
Development version 07a76a06f9a4 on master branch; build date 2023-02-16.

@minad
Copy link
Owner

minad commented Feb 16, 2023

If you install the package via package-install from ELPA, the modes will be there. Maybe you use some non standard installation method? In that case you have to adapt accordingly.

@minad minad closed this as completed Feb 16, 2023
@aadi58002
Copy link
Author

aadi58002 commented Feb 16, 2023

@minad I am using straight.el

(defvar bootstrap-version)
(let ((bootstrap-file
         (expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory))
        (bootstrap-version 6))
    (unless (file-exists-p bootstrap-file)
      (with-current-buffer
          (url-retrieve-synchronously
           "https://raw.githubusercontent.com/radian-software/straight.el/develop/install.el"
           'silent 'inhibit-cookies)
        (goto-char (point-max))
        (eval-print-last-sexp)))
    (load bootstrap-file nil 'nomessage))
(setq-default straight-vc-git-default-clone-depth 1)
(setq straight-use-package-by-default t) 
(straight-use-package 'use-package)
(defun corfu-enable-in-minibuffer ()
"Enable Corfu in the minibuffer if `completion-at-point' is bound."
(when (where-is-internal #'completion-at-point (list (current-local-map)))
    ;; (setq-local corfu-auto nil) ;; Enable/disable auto completion
    (setq-local corfu-echo-delay nil ;; Disable automatic echo and popup
                corfu-popupinfo-delay nil)
    (corfu-mode 1)))
(use-package corfu
  :init
  ;; Setup corfu for popup like completion
  (setq corfu-cycle t  ; Allows cycling through candidates
        corfu-auto t   ; Enable auto completion
        corfu-auto-prefix 1  ; Complete with less prefix keys
        corfu-auto-delay 0.0  ; No delay for completion
        corfu-echo-documentation 0.0  ; Echo docs for current completion option
        corfu-quit-at-boundary 'insert)
  (global-corfu-mode 1)
  (add-hook 'minibuffer-setup-hook #'corfu-enable-in-minibuffer)
  (advice-add #'lsp-completion-at-point :around #'cape-wrap-noninterruptible))

@aadi58002
Copy link
Author

The files for the extensions are in straight repos
Screenshot_20230216_171803

@okamsn
Copy link

okamsn commented Feb 16, 2023

You need to make sure that Straight is adding that directory.

See an example here, for Vertico:
https://github.com/minad/vertico/wiki/Migrating-from-Selectrum-to-Vertico#loading-vertico-extensions

@aadi58002
Copy link
Author

You need to make sure that Straight is adding that directory.

See an example here, for Vertico: https://github.com/minad/vertico/wiki/Migrating-from-Selectrum-to-Vertico#loading-vertico-extensions

Thanks for the help @okamsn. It is very much appreciated.
The solution worked after add files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants