General, minor refactor
This commit is contained in:
parent
01042192b8
commit
9a71a73538
3 changed files with 10 additions and 4 deletions
|
@ -315,6 +315,6 @@ project."
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun doom-set-buffer-real (buffer flag)
|
(defun doom-set-buffer-real (buffer flag)
|
||||||
"Forcibly mark a buffer's real property, no matter what."
|
"Forcibly mark BUFFER as FLAG (non-nil = real)."
|
||||||
(with-current-buffer buffer
|
(with-current-buffer buffer
|
||||||
(setq doom-real-buffer-p flag)))
|
(setq doom-real-buffer-p flag)))
|
||||||
|
|
|
@ -6,6 +6,11 @@
|
||||||
(expand-file-name "templates/" (file-name-directory load-file-name))
|
(expand-file-name "templates/" (file-name-directory load-file-name))
|
||||||
"The path to a directory of yasnippet folders to use for file templates.")
|
"The path to a directory of yasnippet folders to use for file templates.")
|
||||||
|
|
||||||
|
|
||||||
|
;;
|
||||||
|
;; Plugins
|
||||||
|
;;
|
||||||
|
|
||||||
(def-package! autoinsert ; built-in
|
(def-package! autoinsert ; built-in
|
||||||
:defer 1
|
:defer 1
|
||||||
:init
|
:init
|
||||||
|
@ -18,10 +23,11 @@
|
||||||
(auto-insert-mode 1)
|
(auto-insert-mode 1)
|
||||||
|
|
||||||
(defun +file-templates--expand (key &optional mode project-only)
|
(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)
|
(when (if project-only (doom-project-p) t)
|
||||||
(require 'yasnippet)
|
(require 'yasnippet)
|
||||||
(unless yas-minor-mode (yas-minor-mode-on))
|
(unless yas-minor-mode
|
||||||
|
(yas-minor-mode-on))
|
||||||
(when (and yas-minor-mode
|
(when (and yas-minor-mode
|
||||||
(yas-expand-snippet (yas-lookup-snippet key mode t))
|
(yas-expand-snippet (yas-lookup-snippet key mode t))
|
||||||
(and (featurep 'evil) evil-mode)
|
(and (featurep 'evil) evil-mode)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
;;; private/default/config.el -*- lexical-binding: t; -*-
|
;;; private/default/config.el -*- lexical-binding: t; -*-
|
||||||
|
|
||||||
(def-package! emacs-snippets)
|
(def-package! emacs-snippets :after yasnippet)
|
||||||
|
|
||||||
|
|
||||||
;;
|
;;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue