diff options
author | Franck Cuny <franck@fcuny.net> | 2022-04-14 19:56:19 -0700 |
---|---|---|
committer | Franck Cuny <franck@fcuny.net> | 2022-04-14 19:56:19 -0700 |
commit | 47b2070d8fc0fe3aa8b90ae094b90aee92603979 (patch) | |
tree | bfbd6e987076045385904a3d78fb2c37ddbd554a /emacs/custom/my-completion.el | |
parent | replace avy/counsel with vertico/consult (diff) | |
download | emacs.d-47b2070d8fc0fe3aa8b90ae094b90aee92603979.tar.gz |
replace company with corfu
Diffstat (limited to '')
-rw-r--r-- | emacs/custom/my-completion.el | 29 |
1 files changed, 25 insertions, 4 deletions
diff --git a/emacs/custom/my-completion.el b/emacs/custom/my-completion.el index 98744a7..487045b 100644 --- a/emacs/custom/my-completion.el +++ b/emacs/custom/my-completion.el @@ -7,7 +7,12 @@ (use-package vertico :ensure t :init - (vertico-mode)) + (vertico-mode) + (vertico-multiform-mode 1) + (setq vertico-multiform-commands + '((consult-imenu buffer indexed) + (consult-org-heading buffer indexed) + (consult-outline buffer indexed)))) (use-package marginalia :ensure t @@ -26,17 +31,33 @@ ("M-g e" . consult-compile-error) ("M-g f" . consult-flymake) ("M-g M-g" . consult-goto-line) - ("M-g o" . consult-outline) + ("M-g O" . consult-outline) + ("M-g o" . consult-org-heading) ("M-g m" . consult-mark) ("M-g k" . consult-global-mark) ("C-c i" . consult-imenu) - ("M-s d" . consult-find) ("C-c f" . consult-git-grep) ("C-c /" . consult-ripgrep) ("M-s l" . consult-line) ("M-s L" . consult-line-multi) ("M-s m" . consult-multi-occur) - ("M-s k" . consult-keep-lines))) + ("M-s k" . consult-keep-lines) + ;; Isearch integration + ("M-s e" . consult-isearch-history) + :map isearch-mode-map + ("M-e" . consult-isearch-history) ;; orig. isearch-edit-string + ("M-s e" . consult-isearch-history) ;; orig. isearch-edit-string + ("M-s l" . consult-line) ;; needed by consult-line to detect isearch + ("M-s L" . consult-line-multi) ;; needed by consult-line to detect isearch + )) + +(use-package corfu + :ensure t + :custom + (corfu-cycle t) ;; Enable cycling for `corfu-next/previous' + (corfu-auto t) ;; Enable auto completion + :init + (corfu-global-mode)) (provide 'my-completion) ;;; my-completion.el ends here |