fix(vertico): remove undefined completion style

Remove undefined style completion type `+vertico-basic-remote`, fixing
`invalid completion style` errors emitted from `vertico--exhibit`.

Ref: https://github.com/doomemacs/doomemacs/issues/7491#issuecomment-2012682178
Fix: #7491
This commit is contained in:
Philippe Ivaldi
2025-03-24 02:27:26 +01:00
committed by GitHub
parent d92920405a
commit 53387f4905

View File

@ -88,15 +88,14 @@ orderless."
(add-to-list (add-to-list
'completion-styles-alist 'completion-styles-alist
'(+vertico-basic-remote '(+vertico-basic-remote-try-completion
+vertico-basic-remote-try-completion
+vertico-basic-remote-all-completions +vertico-basic-remote-all-completions
"Use basic completion on remote files only")) "Use basic completion on remote files only"))
(setq completion-styles '(orderless basic) (setq completion-styles '(orderless basic)
completion-category-defaults nil completion-category-defaults nil
;; note that despite override in the name orderless can still be used in ;; note that despite override in the name orderless can still be used in
;; find-file etc. ;; find-file etc.
completion-category-overrides '((file (styles +vertico-basic-remote orderless partial-completion))) completion-category-overrides '((file (styles orderless partial-completion)))
orderless-component-separator #'orderless-escapable-split-on-space) orderless-component-separator #'orderless-escapable-split-on-space)
;; ...otherwise find-file gets different highlighting than other commands ;; ...otherwise find-file gets different highlighting than other commands
(set-face-attribute 'completions-first-difference nil :inherit nil)) (set-face-attribute 'completions-first-difference nil :inherit nil))
@ -377,13 +376,13 @@ orderless."
"If MODE is enabled, highlight it as font-lock-constant-face." "If MODE is enabled, highlight it as font-lock-constant-face."
(let ((sym (intern cmd))) (let ((sym (intern cmd)))
(with-current-buffer (nth 1 (buffer-list)) (with-current-buffer (nth 1 (buffer-list))
(if (or (eq sym major-mode) (if (or (eq sym major-mode)
(and (and
(memq sym minor-mode-list) (memq sym minor-mode-list)
(boundp sym) (boundp sym)
(symbol-value sym))) (symbol-value sym)))
(add-face-text-property 0 (length cmd) 'font-lock-constant-face 'append cmd))) (add-face-text-property 0 (length cmd) 'font-lock-constant-face 'append cmd)))
cmd)) cmd))
(add-to-list 'vertico-multiform-categories (add-to-list 'vertico-multiform-categories
'(file '(file