diff --git a/.config/emacs/config.org b/.config/emacs/config.org index f7e5a5e..4f561d9 100644 --- a/.config/emacs/config.org +++ b/.config/emacs/config.org @@ -634,9 +634,10 @@ Language Server Protocol. #+BEGIN_SRC emacs-lisp (use-package yasnippet :defer t - :config + :init (setq yas-snippet-dirs (list (concat dot-emacs-dir "/snippets"))) (setq yas-prompt-functions '(yas-completing-prompt)) + :config (yas-global-mode)) (use-package yasnippet-snippets diff --git a/.config/emacs/snippets/c++-mode/guard b/.config/emacs/snippets/c++-mode/guard index 0fe300d..a37be0a 100644 --- a/.config/emacs/snippets/c++-mode/guard +++ b/.config/emacs/snippets/c++-mode/guard @@ -3,8 +3,8 @@ # key: grd # -- #ifndef ${1:GUARD}_H -#define ${1:$(yas-c++-class-name yas-text)}_H +#define $1_H $0 -#endif // ${1:$(yas-c++-class-name yas-text)}_H \ No newline at end of file +#endif // $1_H \ No newline at end of file