Set company-dabbrev-minimum-length and company-dabbrev-other-buffers.