In org-mode, when I type some numbers, company always pops up the number completion like:
20
20001 -----------1
200111 ----------2
These numbers come from my org-mode files.
I would like to turn off company number completion. How can I do this?
This can be solved by modifying company-transformers with the following code:
(push (apply-partially #'cl-remove-if
(lambda (c)
(or (string-match-p "[^\x00-\x7F]+" c)
(string-match-p "[0-9]+" c)
(if (equal major-mode "org")
(>= (length c) 15)))))
company-transformers)
With this code:
All kinds of things can be customized.
Hope this helps!
This is probably coming from the dabbrev back end. You can remove it like this:
(delete 'company-dabbrev company-backends)
You can set company-dabbrev-other-buffers
to nil
, so company only searches in the active buffer:
(setq company-dabbrev-other-buffers nil)