Skip to content

Commit eda2aba

Browse files
committed
not push company-capf to company-backends when in grouped backends
1 parent ac71048 commit eda2aba

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

lsp-completion.el

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -910,7 +910,14 @@ If the candidates is non-empty, return the passed STRING and POINT."
910910
(fboundp 'company-mode))
911911
(setq-local company-abort-on-unique-match nil)
912912
(company-mode 1)
913-
(setq-local company-backends (cl-adjoin 'company-capf company-backends :test #'equal)))
913+
(let ((expected-backend 'company-capf))
914+
(unless (cl-some (lambda (candidate-backend)
915+
(if (listp candidate-backend)
916+
(memq expected-backend candidate-backend)
917+
(eq expected-backend candidate-backend)))
918+
company-backends)
919+
(setq-local company-backends
920+
(cons expected-backend company-backends)))))
914921
(t
915922
(lsp--warn "Unable to autoconfigure company-mode.")))
916923

0 commit comments

Comments
 (0)