3

I'm trying to get work auto-complete. I've installed the package from MELPA successfully. However, it just does not work. When I enable auto-complete-mode the mode seems to be active (I see AC in the list of minor modes), but there is no pop-up window displaying completions when I enter some text.

I thought that it should work out-of-box, but may be it's not the case. I cannot find instructions how to configure the package installed via package manager, not manually. What actions should I undertake?

1 Answer 1

5

Package installation isn't intended to enable packages. Rather, installation makes code available for use. So some config is generally required for non-trivial packages.

Fortunately, auto-complete comes with auto-complete-config, so you might try initialization code like the following:

(require 'auto-complete-config)
(global-auto-complete-mode t)
(set-default 'ac-sources
             '(ac-source-imenu
               ac-source-dictionary
               ac-source-words-in-buffer
               ac-source-words-in-same-mode-buffers
               ac-source-words-in-all-buffer))
5
  • Is it normal that I should wait 3-4 seconds for the menu? Can I set time of this delay or maybe my computer is really slow ;-) Nov 16, 2014 at 14:50
  • This has little to do with the initial question, please open a new one for this issue.
    – wasamasa
    Nov 16, 2014 at 15:53
  • @Mark Try M-x customize-group RET auto-complete RET and have a read through the manual.
    – sanityinc
    Nov 16, 2014 at 16:01
  • What is principal difference between (set-default 'ac-sources ...) and (ac-config-default)? Nov 16, 2014 at 20:01
  • Haven't looked at the latter, but it probably sets up a slightly different list of sources, so you could probably use whichever you prefer.
    – sanityinc
    Nov 16, 2014 at 21:12

Your Answer

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

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