From 87f4197f234ef838843f0df175d0c5834e58b76e Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Sat, 17 Sep 2022 18:05:15 -0700 Subject: ref(completion): add more packages for completion Get LSP to work with cape and corfu for the completion. Change-Id: Id8f01b1dee77957ff5ba27ed471707b7b9c7dc93 --- emacs/custom/my-completion.el | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) (limited to 'emacs/custom/my-completion.el') 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) -- cgit 1.4.1