emacs - yasnippet does not load automatically when .html file is loaded -


yasnipped has been installed on emacs using elpa/melpa package system.

i can confirm it's in ~/.emacs.d/elpa/yasnippet-20160104.129

when load .html file there's no yasnippet menu, expected, please advise. did not add .emacs

i think solution might cause problems when comes updating elpa yasnippet package. not idea rename package directories.

there couple of things should try first.

  1. when have opened html file, try running

    m-x yas-minor-mode

if works, need add call yas-minor-mode in startup hook html-mode.

  1. alternatively, can try executing

    m-x yas-global-mode

if works, need put call

(yas-global-mode) 

in init.el file

  1. if not work, check value of variables yas-snippets-dirs , yas-installed-snippets-dirs. former normal yas variable lists directories search snippets. latter variable should contain path top level snippets directory in elpa package. former contain

    "~/.emacs.d/snippets" yas-installed-snippets-dires

if yas-installed-snippets-dirs variable exists , looks correct, try putting like

(yas/load-directory yas-installed-snippets-dirs) 

in init.el file after have done require yasnippets


Comments

Popular posts from this blog

c - How to retrieve a variable from the Apache configuration inside the module? -

c# - Constructor arguments cannot be passed for interface mocks -

python - malformed header from script index.py Bad header -