yasnippet-snippets
yasnippet-snippets copied to clipboard
Suggestion: use custom-set-variable
For someone, custom file may be loaded at last of all init code. The changing by yasnippet-snippets-initialize will be overwritten unless one edit custom file or load this package by after-init-hook.
Thanks for the suggestion @Vonfry .
I didn't quite understand what you mean though, so the problem is that since yasnippet-snippets is loaded after yasnippet and before you call snippets-initialize, yasnippet is not picking up all the snippets correctly?
I actually haven't used yasnippet-snippets-initialize for a long time, they are just lazily loaded anyway.
Removing that would not solve your problem?
Example:
(require 'yasnippet)
;; yas-snippet-dirs has a default value
(custom-set-variables '(yas-snippet-dirs some-list))
;; This will be saved in custom-file
(require 'yasnippet-snippets)
;; yasnippet-snippetsinitialize will overwrite yas-snippet-dirs, but not saving in custom-file
(load custom-file)
;; dirs edited by yasnippet-snippetsinitialize is lost.
One way to solve is calling (custom-save-all) before loading custom-file.