I use the following snippet to set up
company-mode for text files and derived modes. I use a curated word list as the source for
(progn (defun sb/company-text-mode () "Add backends for text completion in company mode." (setq-local company-minimum-prefix-length 2) (set (make-local-variable 'company-backends) '(company-files ;; FIXME: Delete duplicates ;; Give priority to dabbrev completions over ispell (:separate company-dabbrev company-ispell) ))) (dolist (hook '(text-mode-hook)) ; Extends to derived modes like `markdown-mode' and `org-mode' (add-hook hook #'sb/company-text-mode)))
How can I avoid duplicates from appearing in
company popups in cases where
company-dabbrev returns a value? Thanks.