54 lines
1.8 KiB
EmacsLisp
54 lines
1.8 KiB
EmacsLisp
;;; 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))
|
|
|
|
|
|
;; (use-package corfu
|
|
;; ;;:ensure (:files (:defaults "extensions/*"))
|
|
;; :demand t ; need this when using :bind or :hook
|
|
;; :config
|
|
;; (global-corfu-mode 1)
|
|
;; :custom
|
|
;; (corfu-auto t)
|
|
;; (corfu-auto-delay 0.5)
|
|
;; (corfu-quit-no-match t) ; quit when the popup appears and I type anything else
|
|
;; ;; Might want to customize corfu-sort-function
|
|
;; ;; :bind
|
|
;; ;; (("M-RET" . completion-at-point)
|
|
;; ;; )
|
|
;; )
|
|
|
|
|
|
;; 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)
|