summary refs log tree commit diff
path: root/emacs
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2022-10-17 18:24:10 -0700
committerFranck Cuny <franck@fcuny.net>2022-10-17 18:24:10 -0700
commit4022f6a9a9742ac5f63524d1984fbaec2585eec1 (patch)
tree6e097984f2a297fe09a6df8d588829dde01ae497 /emacs
parentref(ui): remote the regex for uniquify (diff)
downloademacs.d-4022f6a9a9742ac5f63524d1984fbaec2585eec1.tar.gz
ref(completion): remove vertico-multiform and reorganize the module
I don't know what vertico-multiform is, and it's not loading - let's
delete it!

Change-Id: I82f1c505236e7892635711b5c73d3df8b097df41
Diffstat (limited to 'emacs')
-rw-r--r--emacs/custom/my-completion.el38
1 files changed, 17 insertions, 21 deletions
diff --git a/emacs/custom/my-completion.el b/emacs/custom/my-completion.el
index 1c2ef98..a8629c8 100644
--- a/emacs/custom/my-completion.el
+++ b/emacs/custom/my-completion.el
@@ -4,26 +4,19 @@
 
 ;;; Code:
 
-(require 'vertico)
-(require 'vertico-multiform)
-(require 'marginalia)
+(require 'cape)
+(require 'consult)
 (require 'corfu)
 (require 'corfu-doc)
-(require 'consult)
+(require 'orderless)
+(require 'marginalia)
 (require 'savehist)
-(require 'cape)
-(require 'tempel)
+(require 'vertico)
 
+;;; settings
+;; save the mini buffer's history
 (savehist-mode t)
-
-(setq vertico-multiform-categories
-      '((consult-grep buffer)))
-
-(setq vertico-multiform-commands
-      '((consult-imenu buffer)
-        (consult-ripgrep buffer)
-        (consult-org-heading buffer )
-        (consult-outline buffer)))
+(setq savehist-file (expand-file-name "var/history" user-emacs-directory))
 
 (setq completion-styles '(orderless basic))
 (setq completion-category-defaults nil)
@@ -32,17 +25,15 @@
 (setq corfu-auto t)        ;; Enable auto completion
 (setq corfu-max-width 80)  ;; Default is 100 and is too wide
 
-(add-hook 'corfu-mode-hook #'corfu-doc-mode)
-
-(vertico-mode t)             ;; Enable vertico globally
-(vertico-multiform-mode t)   ;; Enable vertico globally
-(marginalia-mode t)          ;; Enable marginalia globally
-(global-corfu-mode)          ;; Enable corfu globally
+(vertico-mode t)           ;; Enable vertico globally
+(marginalia-mode t)        ;; Enable marginalia globally
+(global-corfu-mode)        ;; Enable corfu globally
 
 (add-to-list 'completion-at-point-functions #'cape-file)
 (add-to-list 'completion-at-point-functions #'cape-abbrev)
 (add-to-list 'completion-at-point-functions #'cape-ispell)
 
+;;; bindings
 (global-set-key (kbd "C-c m") 'consult-mode-command)
 (global-set-key (kbd "C-x b") 'consult-buffer)
 (global-set-key (kbd "C-x 4 b") 'consult-buffer-other-window)
@@ -63,6 +54,11 @@
 (global-set-key (kbd "M-s l") 'consult-line)
 (global-set-key (kbd "M-s L") 'consult-line-multi)
 
+;;; hooks
+;; display a documentation popup for completion candidate when using
+;; corfu
+(add-hook 'corfu-mode-hook #'corfu-doc-mode)
+
 (provide 'my-completion)
 
 ;;; my-completion.el ends here