3

Elpy provides company-mode to handle autocompletion. The way it is set up, company only turns on when I am in something handled by Elpy.

If I enable auto-complete it works in non-python files, but then both company and auto-complete pop up, which is not desired behavior.

How can I enable company to still work within Elpy, but turn on auto-complete to be on elsewhere, and not clobber company?

2
  • Why would you want to use both?
    – PythonNut
    Commented Apr 15, 2015 at 20:44
  • @PythonNut Quite possibly because I don't entirely understand what I am doing. Lets say I do want to use company mode for everything. Do I just need to call global-company-mode after calling elpy-enable in my init.el? I know that elpy uses company mode, but is it only in scope when I'm in a python file, or will calling elpy-enable basically put it in place globally?
    – laydros
    Commented Apr 17, 2015 at 13:11

1 Answer 1

3

You should be able to just enable company-mode globally without any problems with Elpy (if there are any, please do file a bug report!).

You can also use auto-complete in buffers other than Python mode buffers (auto-complete supports different backends from company-mode, so might be preferable for some), by removing python-mode from ac-modes. This will then not enable auto-complete in Python buffers.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.