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 | |
parent | 8ac3dd2358b2da31a6b2dce75e8cc65a6bfd8b11 (diff) | |
download | dotfiles-85e6312355cfb8a0f1774a05b1e671bc89a97235.tar.gz dotfiles-85e6312355cfb8a0f1774a05b1e671bc89a97235.tar.bz2 dotfiles-85e6312355cfb8a0f1774a05b1e671bc89a97235.zip |
Add emacs snippet config
-rw-r--r-- | .emacs.d/init.el | 1 | ||||
-rw-r--r-- | .emacs.d/lisp/init-snippet.el | 12 |
2 files changed, 13 insertions, 0 deletions
diff --git a/.emacs.d/init.el b/.emacs.d/init.el index 9f87d7c..f400fc8 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -40,6 +40,7 @@ (require 'init-terminal) (require 'init-misc) (require 'init-godot) +(require 'init-snippet) (require 'init-appearance) (add-hook 'after-init-hook 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) |