I'm trying to do a snipped with default values being files in a directory, but fail. Seems calling elisp-code in yas-choose-value need special treatment?
I know you can hardcode it. something like
${1:file-name$(yas-choose-value '("foo" "bar"))}
But I want to call 'directory-files' which should return the list ("foo" "bar"). So, something like:
${1:file-name$(yas-choose-value `(directory-files ~/some/path)`}
But I get all kinds of errors doing that. Most often:
[yas] elisp error! Symbol's value as variable is void: YY(foo bar)...
Where do I go wrong?