Commit Graph

28 Commits

Author SHA1 Message Date
ad6a3d0f33 refactor: deprecate featurep! for modulep!
featurep! will be renamed modulep! in the future, so it's been
deprecated. They have identical interfaces, and can be replaced without
issue.

featurep! was never quite the right name for this macro. It implied that
it had some connection to featurep, which it doesn't (only that it was
similar in purpose; still, Doom modules are not features). To undo such
implications and be consistent with its namespace (and since we're
heading into a storm of breaking changes with the v3 release anyway),
now was the best opportunity to begin the transition.
2022-08-14 20:43:35 +02:00
b6ba1204bf fix(file-templates): unescaped periods in regexps 2022-08-07 20:58:29 +02:00
3ca74a1d5f feat(file-templates): add .doomrc template
Ref: 9b8ed397e8
2022-08-07 20:57:55 +02:00
1f8bf7accb merge: rewrite-docs
I've omitted docs/*.org from this merge, as there is still work left to
do there, but I am pushing the module docs early so folks can benefit
from the new docs sooner.
2022-08-03 03:27:50 +02:00
54d8c49d8b refactor(file-templates): suppress in indirect buffers
Change how we detect and suppress file template expansion in org-capture
buffers (which are indirect clones). Since 99.99% of the time, an
indirect clone means we're doing something special in that buffer, it
seemed sensible to always suppress file templates in them. Hopefully
this will be more robust than the former advice.
2022-03-21 03:57:02 +01:00
893b4171b7 tweak(file-templates): remove default JSON template
As described at https://www.json.org/json-en.html, JSON has multiple
top-level forms (at least objects and arrays, and potentially all values
as well, depending on who you ask). Of these, I would not say array is a
good default. I frequently find myself deleting this default, generally
to use an object instead.

Because there is no consistent winner, and because the template is so
trivial, it seems best to simply delete it: the cost of the template not
matching the user's intent outweighs any benefit it stands to deliver
when it does match the user's intent.
2022-03-19 16:14:53 +01:00
0aad1399cc refactor(file-templates): doom readme templates
Including readme template for categories.
2021-11-21 20:04:28 +01:00
06392a723f refactor: rename orig-fn arg in advice to fn
A minor tweak to our naming conventions for the first argument of an
:around advice.
2021-08-04 01:53:12 -04:00
da54fa98ce Fix #4271: prevent file-templates in org-capture 2020-11-14 12:57:29 -05:00
8da2472bb4 Inhibit file templates in org-journal-mode 2020-06-04 20:13:29 -04:00
8bf902d5f4 General refactors & reformatting across the board 2020-06-04 20:13:28 -04:00
3a4c83ec3b Fix file template :when logic to apply to modes
When a file template rule is evaluated against a particular buffer it is
supposed to call the :when function if it is defined. Currently, the
function is ignored if the PRED of the template rule is a mode. This
fixes this issue.
2020-02-26 10:45:14 -07:00
037bcf3c12 Fix #2568: change when file-templates are expanded 2020-02-20 17:24:16 -05:00
7b40e80a8f Fix +file-template-p to use :when keyword 2020-02-13 23:32:27 -06:00
d0b50da2c4 Add elisp package file-template 2020-01-20 19:31:36 -05:00
0c9f1b1a9c Minor refactors & comment revision 2020-01-11 17:27:04 -05:00
fd00870ae8 Fix #1401 2019-10-31 20:51:20 -04:00
3f759dde23 Optimize file-template find-file hook function 2019-10-25 20:25:20 -04:00
8f1de7c998 Fix #1694: wrong-type-arg stringp errors on some files 2019-08-21 21:17:42 -04:00
fb619bdb0f Only trigger file-templates for non-existent files #1682
Possibly addresses #1401 too
2019-08-19 14:18:17 -04:00
c795a988e6 Conform many modules to new conventions 2019-07-23 12:30:47 +02:00
0625bf87d6 Add a nxml-mode file template 2019-07-18 03:41:47 +02:00
c2fe951062 Add direnv-envrc-mode file template 2019-07-10 02:27:13 +02:00
5662b2c4b3 Add shell.nix file-template 2019-07-08 14:36:38 +02:00
c3d48e286b Add nix-mode file template 2019-06-27 21:35:53 +02:00
c0bffd4268 editor/file-templates: general refactor 2019-06-18 00:29:05 +02:00
21cf1c2da6 editor/file-templates: fix #1401
org-capture, when used on a target that doesn't exist, will invisibly
expand a file template, leaving a hang yasnippet active. After
org-capture initializes, the yasnippet will attempt to operate on
overlays that don't exist, throwing overlayp errors.
2019-06-18 00:21:26 +02:00
77e4cc4d58 💥 Remove :feature category
:feature was a "catch-all" category. Many of its modules fit better in
other categories, so they've been moved:

- feature/debugger -> tools/debugger
- feature/evil -> editor/evil
- feature/eval -> tools/eval
- feature/lookup -> tools/lookup
- feature/snippets -> editor/snippets
- feature/file-templates -> editor/file-templates
- feature/workspaces -> ui/workspaces

More potential changes in the future:

- A new :term category for terminal emulation modules (eshell, term and
  vterm).
- A new :os category for modules dedicated to os-specific functionality.
  The :tools macos module would fit here, but so would modules for nixos
  and arch.
- A new :services category for web-service integration, like wakatime,
  twitter, elfeed, gist and pastebin services.
2019-04-24 18:16:04 -04:00