doomemacs/modules/editor/snippets
Henrik Lissner 179e5fb320
fix(snippets): copy-and-edit workflow
There were a number of issues with the "copy and edit" workflow of the
snippets module. I.e. Snippets that live in $EMACSDIR/.local should not
be modified directly, so they ought to be opened in read-only-mode. This
also originally applied to file-templates snippets, but I figured that
was too excessive.

With this, you can now type `C-c C-e` in these buffers to automatically
copy them to $DOOMDIR/snippets/MODE/ so you can create your own to
overwrite the original.

This also fixes an issue where `+snippets/find` and
`+snippets/find-for-current-mode` may throw errors about an undefined
`template-uuid` variable (doomemacs/community#105)

Fix: doomemacs/community#105
2026-05-11 17:41:25 -04:00
..
autoload fix(snippets): copy-and-edit workflow 2026-05-11 17:41:25 -04:00
.doommodule feat: add .doommodule files 2024-09-14 20:47:39 -04:00
config.el fix(snippets): copy-and-edit workflow 2026-05-11 17:41:25 -04:00
packages.el bump: :editor 2025-06-12 17:10:28 +02:00
README.org docs(*): replace all-the-icons with nerd-icons 2023-09-16 20:19:11 +02:00

:editor snippets

Description   unfold

This module adds snippet expansions to Emacs, powered by doom-package:yasnippet.

Module flags

This module exposes no flags.

TODO Hacks

󱌣 This module's hacks haven't been documented yet. Document them?

TODO Changelog

This module does not have a changelog yet.

Installation

Enable this module in your doom! block.

This module has no external requirements.

TODO Usage

󱌣 This module has no usage documentation yet. Write some?

TODO Configuration

󱌣 This module's configuration documentation is incomplete. Complete it?

Disabling the built-in snippets

;; in $DOOMDIR/packages.el
(package! doom-snippets :ignore t)
;; If you want to replace it with yasnippet's default snippets
(package! yasnippet-snippets)

Adding custom snippets

Custom snippets should be added under $DOOMDIR/snippets/ directory. Refer to yasnippet-documentation on how to write snippets.

Troubleshooting

There are no known problems with this module. Report one?

Frequently asked questions

This module has no FAQs yet. Ask one?

TODO Appendix

󱌣 This module has no appendix yet. Write one?