mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
nit(corfu): revise comments, grammar, and formatting
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
#+title: :completion corfu
|
||||
#+subtitle: Complete with cap(f), cape and a flying feather
|
||||
#+subtitle: Complete with cap(f), cape, and a flying feather
|
||||
#+created: September 9, 2022
|
||||
#+since: 3.0.0 (#7002)
|
||||
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
;;;###autoload
|
||||
(defun +corfu/move-to-minibuffer ()
|
||||
"Move the current list of candidates to your choice of minibuffer completion UI."
|
||||
"Move list of candidates to your choice of minibuffer completion UI."
|
||||
(interactive)
|
||||
(pcase completion-in-region--data
|
||||
(`(,beg ,end ,table ,pred ,extras)
|
||||
|
@ -60,6 +60,7 @@ If any return non-nil, `corfu-auto' will not invoke as-you-type completion.")
|
||||
'separator t)
|
||||
corfu-quit-no-match corfu-quit-at-boundary
|
||||
tab-always-indent 'complete)
|
||||
|
||||
(add-to-list 'completion-category-overrides `(lsp-capf (styles ,@completion-styles)))
|
||||
(add-to-list 'corfu-auto-commands #'lispy-colon)
|
||||
(add-to-list 'corfu-continue-commands #'+corfu/move-to-minibuffer)
|
||||
@ -125,11 +126,11 @@ See `+corfu-want-minibuffer-completion'."
|
||||
:around #'ispell-completion-at-point
|
||||
(condition-case-unless-debug e
|
||||
(apply fn args)
|
||||
('error
|
||||
(message "Error: %s" (error-message-string e))
|
||||
(message "Auto-disabling `text-mode-ispell-word-completion'")
|
||||
(setq text-mode-ispell-word-completion nil)
|
||||
(remove-hook 'completion-at-point-functions #'ispell-completion-at-point t)))))
|
||||
('error
|
||||
(message "Error: %s" (error-message-string e))
|
||||
(message "Auto-disabling `text-mode-ispell-word-completion'")
|
||||
(setq text-mode-ispell-word-completion nil)
|
||||
(remove-hook 'completion-at-point-functions #'ispell-completion-at-point t)))))
|
||||
|
||||
(use-package! cape
|
||||
:defer t
|
||||
@ -218,8 +219,8 @@ See `+corfu-want-minibuffer-completion'."
|
||||
;; If vertico is not enabled, orderless will be installed but not configured.
|
||||
;; That may break smart separator behavior, so we conditionally configure it.
|
||||
(use-package! orderless
|
||||
:when (and (not (modulep! :completion vertico))
|
||||
(modulep! +orderless))
|
||||
:when (not (modulep! :completion vertico))
|
||||
:when (modulep! +orderless)
|
||||
:config
|
||||
(setq completion-styles '(orderless basic)
|
||||
completion-category-defaults nil
|
||||
|
@ -7,9 +7,9 @@
|
||||
(package! nerd-icons-corfu :pin "13166345b290d6c6a2ac6ba94a8d28ec3bb58c67"))
|
||||
(when (and (not (modulep! :completion vertico))
|
||||
(modulep! +orderless))
|
||||
;; enabling +orderless without vertico should be fairly niche enough that to
|
||||
;; Enabling +orderless without vertico should be fairly niche enough that to
|
||||
;; save contributor headaches we should only pin vertico's orderless and leave
|
||||
;; this one unpinned
|
||||
;; this one unpinned.
|
||||
(package! orderless))
|
||||
(when (modulep! :os tty)
|
||||
(package! corfu-terminal :pin "501548c3d51f926c687e8cd838c5865ec45d03cc"))
|
||||
|
Reference in New Issue
Block a user