;;; init-completion.el --- -*- lexical-binding: t -*- ;;; Commentary: ;;; Code: (use-package corfu ;; Optional customizations :custom (corfu-cycle t) ;; Enable cycling for `corfu-next/previous' (corfu-auto t) ;; Enable auto completion ;; (corfu-separator ?\s) ;; Orderless field separator ;; (corfu-quit-at-boundary nil) ;; Never quit at completion boundary ;; (corfu-quit-no-match nil) ;; Never quit, even if there is no match ;; (corfu-preview-current nil) ;; Disable current candidate preview ;; (corfu-preselect 'prompt) ;; Preselect the prompt ;; (corfu-on-exact-match nil) ;; Configure handling of exact matches ;; (corfu-scroll-margin 5) ;; Use scroll margin ;; Enable Corfu only for certain modes. ;; :hook ((prog-mode . corfu-mode) ;; (shell-mode . corfu-mode) ;; (eshell-mode . corfu-mode)) ;; Recommended: Enable Corfu globally. This is recommended since Dabbrev can ;; be used globally (M-/). See also the customization variable ;; `global-corfu-modes' to exclude certain modes. :config (global-corfu-mode 1) (set-face-attribute 'corfu-border nil :background "gray87") (set-face-attribute 'corfu-current nil :background "DarkOrange4" :foreground "gray100") ) ;; Nice icons for corfu popups (use-package kind-icon :after corfu :config (add-to-list 'corfu-margin-formatters #'kind-icon-margin-formatter)) (provide 'init-completion)