I\'m using auto-complete and yasnippet in Emacs and I am confused by their settings. I placed the following code in my .emacs
:
ac-config-default
installs hooks to setup sensible default ac-sources
values. These hooks (especially ac-common-setup
) might interfere with your settings.
You can check this by looking at the actual value of ac-sources
(C-h vac-sources
) in a js-mode
buffer to see if it has been modified by comparison to your custom value.
If this is the case, I see two solutions:
ac-config-default
and specifiy all autocomplete
settings,ac-source-yasnippet
at the beginning of ac-sources
after it has run. Assuming ac-common-setup is indeed the troublemaker, this would look like:(defadvice ac-common-setup (after give-yasnippet-highest-priority activate)
(setq ac-sources (delq 'ac-source-yasnippet ac-sources))
(add-to-list 'ac-sources 'ac-source-yasnippet))