summary refs log tree commit diff
path: root/emacs/custom/my-completion.el
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--emacs/custom/my-completion.el22
1 files changed, 16 insertions, 6 deletions
diff --git a/emacs/custom/my-completion.el b/emacs/custom/my-completion.el
index 818355b..ecc5adb 100644
--- a/emacs/custom/my-completion.el
+++ b/emacs/custom/my-completion.el
@@ -9,6 +9,11 @@
 (require 'marginalia)
 (require 'corfu)
 (require 'consult)
+(require 'savehist)
+(require 'cape)
+(require 'tempel)
+
+(savehist-mode t)
 
 (setq vertico-multiform-categories
       '((consult-grep buffer)))
@@ -22,13 +27,18 @@
 (setq completion-styles '(orderless basic))
 (setq completion-category-defaults nil)
 
-(setq corfu-cycle t)  ;; Enable cycling for `corfu-next/previous'
-(setq corfu-auto t)   ;; Enable auto completion
+(setq corfu-cycle t)       ;; Enable cycling for `corfu-next/previous'
+(setq corfu-auto t)        ;; Enable auto completion
+(setq corfu-max-width 80)  ;; Default is 100 and is too wide
+
+(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)
-(vertico-multiform-mode 1)
-(marginalia-mode)
-(global-corfu-mode)
+(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)
 
 (global-set-key (kbd "C-c m") 'consult-mode-command)
 (global-set-key (kbd "C-x b") 'consult-buffer)