How can I stop company-mode from autocompleting dictionary words? I only want it to autocomplete commands.
This is my config:
(use-package company
:ensure
:defer 4
:init (progn
(global-company-mode)
(setq company-global-modes '(not python-mode cython-mode sage-mode))
)
:config (progn
(setq company-tooltip-limit 20
company-idle-delay .1
company-echo-delay 0
company-begin-commands '(self-insert-command)
company-transformers '(company-sort-by-occurrence)
company-selection-wrap-around t
company-idle-delay .1
company-minimum-prefix-length 1
company-selection-wrap-around t
company-dabbrev-downcase nil
)
(bind-keys :map company-active-map
("C-n" . company-select-next)
("C-p" . company-select-previous)
("C-d" . company-show-doc-buffer)
("<tab>" . company-complete)
("<escape>" . company-abort)
)
)
)
UPDATE: I just noticed that it autocompletes not from the dictionary (ispell) but from all words already existing in the current buffer. How can I stop it from doing so?
company-backends
, do you seecompany-dabbrev
in the list of backends for the major mode you are using ? If so, try to removecompany-dabbrev
fromcompany-backends
and let me know if it works for youcompany-keywords
is the backend which complete default keywords from dictionary file.company-minimum-prefix-length
. I ended up removing thecompany
from the melpa channel and installing that from thegnu
channel instead, and that fixed the issue.