Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to prevent create snippets dir directly under .emacs.d? #1155

Open
AlynxZhou opened this issue Dec 27, 2022 · 0 comments
Open

How to prevent create snippets dir directly under .emacs.d? #1155

AlynxZhou opened this issue Dec 27, 2022 · 0 comments

Comments

@AlynxZhou
Copy link

I'd like to move this dir to .emacs.d/.local/snippets, but every time it creates .emacs.d/snippets, I tried following config:

(use-package yasnippet
  :ensure t
  :custom
  (yas-snippet-dirs `(,(locate-user-emacs-file ".local/snippets"))))

it accepts this path, but still create the .emacs.d/snippets.

I tried to read the code and I found yas--load-snippet-dirs will create .emacs.d/snippets if it exists in yas-snippet-dirs (https://github.com/joaotavora/yasnippet/blob/master/yasnippet.el#L1983-L1999), though I modified it to exclude .emacs.d/snippets, I think this may be called before user customize yas-snippet-dirs?

Another solution may be that let user custom yas--default-user-snippets-dir instead of making it a constant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant