;;; my-completion.el --- Configure parts related to completion -*- lexical-binding: t -*- ;;; Commentary: ;;; Code: (require 'vertico) (require 'vertico-multiform) (require 'marginalia) (require 'corfu) (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 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 (vertico-mode) (vertico-multiform-mode 1) (marginalia-mode) (global-corfu-mode) (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) (global-set-key (kbd "C-x r b") 'consult-bookmark) (global-set-key (kbd "C-x p b") 'consult-project-buffer) (global-set-key (kbd "C-c i") 'consult-imenu) (global-set-key (kbd "C-c f") 'consult-git-grep) (global-set-key (kbd "C-c /") 'consult-ripgrep) (global-set-key (kbd "C-c r") 'consult-recent-file) (global-set-key (kbd "M-y") 'consult-yank-pop) (global-set-key (kbd "M-g e") 'consult-compile-error) (global-set-key (kbd "M-g f") 'consult-flymake) (global-set-key (kbd "M-g M-g") 'consult-goto-line) (global-set-key (kbd "M-g O") 'consult-outline) (global-set-key (kbd "M-g o") 'consult-org-heading) (global-set-key (kbd "M-g m") 'consult-mark) (global-set-key (kbd "M-g k") 'consult-global-mark) (global-set-key (kbd "M-s l") 'consult-line) (global-set-key (kbd "M-s L") 'consult-line-multi) (provide 'my-completion) ;;; my-completion.el ends here