snippets are not loading

65 views
Skip to first unread message

Jakub Arnold

unread,
Jun 28, 2012, 4:48:17 AM6/28/12
to smart-...@googlegroups.com
I'm having trouble with my custom snippets being loaded. My config for yasnippet is

(require 'yasnippet)
(setq yas/snippet-dirs
      '("~/.emacs.d/el-get/yasnippet/snippets"))
(yas/global-mode 1)

I've created a "new spec" snippet via (yas/new-snippet) which is in ~/.emacs.d/el-get/yasnippet/snippets/ruby-mode/new spec

It contains the following

# -*- mode: snippet -*-
# name: new spec
# key: spec
# --
require "spec_helper"

describe ${1:Class} do

  it "${2:spec description}" do
    $0
  end

end

If I invoke (yas/find-snippets) it puts me in ~/.emacs.d/el-get/yasnippet/snippets where I can go to ruby-mode and open the new spec snippet and invoke C-c C-c it will load properly into the ruby-mode and work from that point on.

But it doesn't get loaded when I start emacs for the first time. I wasn't really able to find a guide that would explain yasnippet autoloading and creating new snippets.

João Távora

unread,
Jul 12, 2012, 2:23:26 PM7/12/12
to smart-...@googlegroups.com
I'm sorry I didn't notice this email earlier. Can you add an issue to
https://github.com/capitaomorte/yasnippet/issues? I'll have a look at
it when I find the time.
> --
> You received this message because you are subscribed to the Google Groups
> "smart-snippet and YASnippet" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/smart-snippet/-/4GZXVgX52lEJ.
> To post to this group, send email to smart-...@googlegroups.com.
> To unsubscribe from this group, send email to
> smart-snippe...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/smart-snippet?hl=en.



--
João Távora
Reply all
Reply to author
Forward
0 new messages