Rudimentary Tempel translation of YASnippet, based on tempel-collection.
  • Emacs Lisp 100%
Find a file
2025-04-21 07:38:57 -03:00
snippets fix(html.eld): boilerplate template 2025-04-21 07:38:57 -03:00
gptel.org docs(gptel): Add gptel.org 2024-11-11 20:01:22 -03:00
LICENSE docs(license): add license 2024-10-10 14:36:03 -03:00
README.org feat(mallard.eld): add mallard snippets from emacs-mallard-snippets 2025-03-29 21:06:26 -03:00
tempel-snippets.el refactor: package header 2024-12-14 10:30:41 -03:00

Tempel Snippets - Rudimentary YASnippet Translation

Tempel Snippets is an effort on translating YASnippet snippets to the Tempel format, using tempel-collection as its core implementation (the .el file). Some of the earlier snippets were translated using GPT-4O (I got the hang of Tempel's syntax after some time), and tested and tweaked by me.

Configuration

I'll only consider uploading this package when I'm sure that any issues are fixed. If you want to install it, consider using a source-based package manager, such as elpaca, or the newer package-vc-install, included as of Emacs 30+. Below are use-package example configurations for Tempel, aswell as different ways of installing this package.

package-vc-install

  (use-package tempel
    :bind
    ("C-c i s" . tempel-insert)
    :ensure t)

  (use-package tempel-snippets
    :after tempel
    :vc (:url "https://github.com/gs-101/tempel-snippets")
    :ensure t)

Straight

  (use-package tempel
    :bind
    ("C-c i s" . tempel-insert)
    :ensure t)

  (use-package tempel-snippets
    :straight (tempel-snippets :host github :repo "gs-101/tempel-snippets")
    :after tempel
    :ensure t)

Elpaca

  (elpaca elpaca-use-package
          (elpaca-use-package-mode))

  (use-package tempel
    :bind
    ("C-c i s" . tempel-insert)
    :ensure t)

  (use-package tempel-snippets
    :host github :repo "gs-101/tempel-snippets"
    :after tempel
    :ensure t)

Comparison

So, how does this package differ from the existing tempel-collection?

  1. This package is meant to be a plain translation of YASnippet Snippets, not introducing any new snippets
  2. Template names are based on the original snippet's keys, so there might be some conflicts with autocompletion

    • Manual inseartion is recommended, as is demonstrated on the configuration example
  3. Since this is directly based on YASnippet Snippets, more modes and snippets are included, since it's an older project

Known Issues

Functionality

  • I haven't used YASnippet prior to working on this, so some functionality might differ from the original.
  • I don't have experience with all the modes included, so there might be some issues with the snippets I couldn't catch.
  • Parent snippets such as c-lang-common currently have no implementation.

Indentation

There's some issues with indentation, specially in the insertion of brackets.