1

I use gtags, jedi and dabbrev for python. Sometimes the duplicates get a bit annoying. I read that using :with should sort out the duplicates problem. However, it does not... Is there a better solution that this? :

(add-hook 'python-mode-hook
          (lambda ()
            (set (make-local-variable 'company-backends)
                 '((company-gtags :with company-jedi company-dabbrev-code)))))

In the Company documentation, Company Backends section there is a line that reads: "‘duplicates’: If non-nil, company will take care of removing duplicates from the list.". I just can't figure out how to enable it.

  • I use anaconda-mode and using company-anaconda along with company-dabbrev-code created a lot of duplicates for me as well. Deleting company-dabbrev-code fixed the problem for me. anaconda backend does the job of dabbrev-code as well. I'm not sure jedi though – Chakravarthy Raghunandan Oct 22 '16 at 12:01
  • I like the dabbrev's functionality of scanning other buffers as well. Does anaconda do that too? – Damian Chrzanowski Oct 22 '16 at 17:18
  • I dont think anaconda-mode does that. But, if you import said file, you will get company completions for that imported file, otherwise not. – Chakravarthy Raghunandan Oct 22 '16 at 17:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.