;;;  -*- lexical-binding: t; -*-

(require 'syd/base)
(require 'syd/keymaps)

;; Project templates via Yasnippet.
(use-package ptemplate
  :custom ((ptemplate-default-workspace (expand-file-name "~/src/"))
           (ptemplate-project-template-dirs
            (list (syd-emacs-file "lisp/syd/ptemplates"))))
  :general (:keymaps 'syd-leader-project-map
            "N" #'ptemplate-new-project))

(defun syd-ptemplate-project-name ()
  "Return the name of the project being generated.
Intended for use in defining project templates."
  (defvar ptemplate-target-directory)
  (file-name-nondirectory (directory-file-name ptemplate-target-directory)))

(provide 'syd/ptemplate)
