blob: b4d3b33caf2766dcebadadc65e13f47d4a59a6f1 (
plain) (
tree)
|
|
;;; my-completion.el --- Configure parts related to completion
;;; Commentary:
;;; Code:
(require 'use-package)
(use-package vertico
:ensure t
:init
(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 orderless
:ensure t
:custom
(completion-styles '(orderless basic))
(completion-category-defaults nil) )
(use-package marginalia
:ensure t
:init
(marginalia-mode))
(use-package consult
:ensure t
:bind (("C-c h" . consult-history)
("C-c m" . consult-mode-command)
("C-x b" . consult-buffer)
("C-x 4 b" . consult-buffer-other-window)
("C-x r b" . consult-bookmark)
("C-x p b" . consult-project-buffer)
("M-y" . consult-yank-pop)
("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-org-heading)
("M-g m" . consult-mark)
("M-g k" . consult-global-mark)
("C-c i" . consult-imenu)
("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)
;; 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
|