I am trying to configure Emacs with yasnippet
and a few templates for JavaScript according to this tutorial .
I am new to Emacs and I can't figure out why the yas
function doesn't exist. The error I get is:
Symbol's function definition is void: yas/initialize
These are the contents of my init file:
(add-to-list 'load-path "~/.emacs.d/yasnippet")
(require 'yasnippet)
(yas-global-mode 1)
(yas/initialize)
;; Load the snippet files themselves
(yas/load-directory "~/.emacs.d/yasnippet/snippets/text-mode")
;; Let's have snippets in the auto-complete dropdown
(add-to-list 'ac-sources 'ac-source-yasnippet)