General, minor refactor

This commit is contained in:
Henrik Lissner 2017-12-27 18:19:33 -05:00
parent 01042192b8
commit 9a71a73538
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
3 changed files with 10 additions and 4 deletions

View file

@ -6,6 +6,11 @@
(expand-file-name "templates/" (file-name-directory load-file-name))
"The path to a directory of yasnippet folders to use for file templates.")
;;
;; Plugins
;;
(def-package! autoinsert ; built-in
:defer 1
:init
@ -18,10 +23,11 @@
(auto-insert-mode 1)
(defun +file-templates--expand (key &optional mode project-only)
"Auto insert a snippet of yasnippet into new file."
"Auto insert a yasnippet snippet into the blank file."
(when (if project-only (doom-project-p) t)
(require 'yasnippet)
(unless yas-minor-mode (yas-minor-mode-on))
(unless yas-minor-mode
(yas-minor-mode-on))
(when (and yas-minor-mode
(yas-expand-snippet (yas-lookup-snippet key mode t))
(and (featurep 'evil) evil-mode)

View file

@ -1,6 +1,6 @@
;;; private/default/config.el -*- lexical-binding: t; -*-
(def-package! emacs-snippets)
(def-package! emacs-snippets :after yasnippet)
;;