From c6c9f113eaef1ba9636dd5342c1cd00c956d61ec Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Mon, 9 Sep 2024 15:34:21 +0200 Subject: emacs: Add tempel & eglot-tempel --- .config/emacs/init.el | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to '.config/emacs/init.el') diff --git a/.config/emacs/init.el b/.config/emacs/init.el index 6823f86..6b29256 100644 --- a/.config/emacs/init.el +++ b/.config/emacs/init.el @@ -515,6 +515,21 @@ existing grammars." :after eglot :config (eglot-booster-mode)) + ;;; Snippet Support +(use-package tempel + :pin gnu + :init + (customize-set-variable + 'tempel-path (expand-file-name "templates" x-config-directory)) + (push (cons tempel-path 'lisp-data-mode) auto-mode-alist)) + +(use-package eglot-tempel + :init + (with-eval-after-load 'eglot + (add-hook 'eglot-managed-mode-hook + (λ (unless (default-value eglot-tempel-mode) + (eglot-tempel-mode)))))) + ;;; Automatically Create Directories (defun x-auto-create-directories (original-function filename &rest arguments) "Automatically create and delete parent directories of files. This -- cgit v1.2.3