diff options
author | Guangxiong Lin <[email protected]> | 2022-11-07 09:56:19 +0800 |
---|---|---|
committer | Guangxiong Lin <[email protected]> | 2022-11-07 09:56:19 +0800 |
commit | 85e6312355cfb8a0f1774a05b1e671bc89a97235 (patch) | |
tree | d7a97ca4f97ba37e5a458f040d1951448afd53a9 /.emacs.d/lisp/init-snippet.el | |
parent | 8ac3dd2358b2da31a6b2dce75e8cc65a6bfd8b11 (diff) | |
download | dotfiles-85e6312355cfb8a0f1774a05b1e671bc89a97235.tar.gz dotfiles-85e6312355cfb8a0f1774a05b1e671bc89a97235.tar.bz2 dotfiles-85e6312355cfb8a0f1774a05b1e671bc89a97235.zip |
Add emacs snippet config
Diffstat (limited to '.emacs.d/lisp/init-snippet.el')
-rw-r--r-- | .emacs.d/lisp/init-snippet.el | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/.emacs.d/lisp/init-snippet.el b/.emacs.d/lisp/init-snippet.el new file mode 100644 index 0000000..5c6609a --- /dev/null +++ b/.emacs.d/lisp/init-snippet.el @@ -0,0 +1,12 @@ +(setq yas-snippet-dirs + '("~/.emacs.d/snippets" + "~/.emacs.d/local/snippets")) + +(when (gx/maybe-require-package 'yasnippet) + (gx/maybe-require-package 'yasnippet-snippets) + (require 'yasnippet) + (yas-reload-all) + (add-hook 'prog-mode-hook #'yas-minor-mode) + (add-hook 'org-mode-hook #'yas-minor-mode)) + +(provide 'init-snippet) |