I want to make the yasnippet
as the backend of the auto-complete
. However, it doesn't work. what I do after searched the internet is as follows:
get the auto-complete-yasnippet.el, add some elisp in the .emacs
like this:
(add-to-list 'load-path
"~/.emacs.d/plugins/yasnippet")
(require 'yasnippet)
(yas-global-mode 1)
(yas-minor-mode nil)
(global-set-key (kbd "M-/") 'yas/expand)
;; Auto-complete settings
;; this is the code for the auto-complete
(require 'auto-complete-config)
(add-to-list 'ac-dictionary-directories "~/.emacs.d//ac-dict")
(ac-config-default)
;;setup for auto-complete-yasnippet
(require 'auto-complete-yasnippet)
(setq-default ac-sources
'(
;; ac-source-semantic
ac-source-yasnippet
ac-source-abbrev
ac-source-words-in-buffer
ac-source-words-in-all-buffer
;; ac-source-imenu
ac-source-files-in-current-dir
ac-source-filename
)
)
I look at the content in the ac-sources
in *scratch* with C-h v, and it does have the ac-source-yasnippet
. someone said that there may be something wrong with the version and upgrade of auto-complete
as well as yasnippet
. How can it be fixed?
My emacs
version is 23.3.1 my auto-complete
version is 1.3.1 and my yasnippet
version is 0.8.0(beta) which is just downloaded from the github. any help?