Commit graph

92 commits

Author SHA1 Message Date
Henrik Lissner
037b018cdd
feat: add .doommodule files
These optional dotfiles indicate the root of a module or module
group (:lang), and will later contain module metadata. They will also
serve as an alternative to packages.el and doctor.el, and will aide the
parts of the v3.0 module API concerned with resolving the current module
from a path (`doom-module-from-path`), which currently rely too heavily
on parsing path strings.

For now, however, they're simply placeholders.
2024-09-14 20:47:39 -04:00
Henrik Lissner
1dc606bb27
fix(file-templates): __doom-readme: use doom-modules-version 2024-09-11 19:46:16 -04:00
Henrik Lissner
a3a0629e03
bump: :editor
doomemacs/snippets@c1384cc797 -> doomemacs/snippets@3a0b029c5d
emacs-evil/evil-collection@ca977acb83 -> emacs-evil/evil-collection@acb056b1d0
emacs-evil/evil@0251080640 -> emacs-evil/evil@0ad84c5216
emacs-straight/adaptive-wrap@70005d2012 -> emacs-straight/adaptive-wrap@a3b179ea21
emacs-tree-sitter/ts-fold@0627723e5f -> emacs-tree-sitter/ts-fold@6ce584d1ac
emacsmirror/visual-fill-column@5e74afe39d -> emacsmirror/visual-fill-column@e04d3521b6
joaotavora/yasnippet@297546f085 -> joaotavora/yasnippet@eb5ba2664c
juliapath/evil-numbers@7a1b62afc1 -> juliapath/evil-numbers@c789989451
justinbarclay/parinfer-rust-mode@e9a23e136b -> justinbarclay/parinfer-rust-mode@a96c768e9d
magnars/multiple-cursors.el@234806c832 -> magnars/multiple-cursors.el@c870c18462
radian-software/apheleia@96a9805ecb -> radian-software/apheleia@61766b50b2
2024-06-22 18:14:05 -04:00
Benjamin Schwehn
4db347769e
fix(file-templates): unknown directive error from __license-lgpl3
The misspelling produces a 'Ignoring unknown directive "contribuer"'
error, which was introduced in joaotavora/yasnippet@25f5d88.

Ref: joaotavora/yasnippet@25f5d8808a
2024-02-08 23:11:48 -05:00
Henrik Lissner
e701522d68
bump: :editor
doomemacs/snippets@d490cba6d7 -> doomemacs/snippets@f022984ee1
emacs-straight/adaptive-wrap@fc9f0306f1 -> emacs-straight/adaptive-wrap@70005d2012
emacs-tree-sitter/ts-fold@75e72c658a -> emacs-tree-sitter/ts-fold@0627723e5f
joaotavora/yasnippet@5cbdbf0d20 -> joaotavora/yasnippet@297546f085
joostkremers/visual-fill-column@695a597892 -> joostkremers/visual-fill-column@db7c7c2365
justinbarclay/parinfer-rust-mode@6e6bdeeba3 -> justinbarclay/parinfer-rust-mode@8df117a3b5
raxod502/apheleia@56651724ad -> raxod502/apheleia@96a9805ecb
2024-02-04 19:18:24 -05:00
RBckmnn
d509d8bea1
fix(file-templates): invalid function call
`evil-initialize-state` recently changed to no longer accept any
arguments, so use `evil-change-state` instead.

Ref: emacs-evil/evil@1c4c3bfff8
2024-02-01 02:38:34 -05:00
Henrik Lissner
88bb045388
docs(*): replace all-the-icons with nerd-icons
Also colorizes the leading icon in notices.
2023-09-16 20:19:11 +02:00
Lorenzo Ravaglia
25602409b6
refactor(file-templates): c++-mode/__main.cpp: modernize
- Drops `using namespace std`: a known anti-pattern which imports a
  massive namespace into the global namespace. See
  https://stackoverflow.com/questions/1452721/why-is-using-namespace-std-considered-bad-practice
- Modernizes/generalizes `main`'s signature with a trailing return
  type (C++11)

Ref: https://stackoverflow.com/questions/1452721/why-is-using-namespace-std-considered-bad-practice
Close: #7387
2023-09-07 20:22:58 +02:00
Lorenzo Ravaglia
9cc9351cae
feat(file-templates): add c-mode/__main.c
Ref: #7387
2023-09-07 20:22:58 +02:00
Liam Hupfer
9c2d50d97e nit: fix docstrings 2023-09-02 11:46:07 -05:00
Henrik Lissner
802f015f26
fix(file-templates): org-capture errors on new files
If an org-capture template generates a new, blank file, Doom steps in to
insert a yasnippet file-template into the buffer.  If the file template
has text fields, it leaves the new buffer in an "editing snippets"
state (and insert mode) which causes errors downstream when org-capture
tries to modify the buffer.

The file-templates module employs some heuristics to prevent false
positives like these, but packages (and org-capture) can get around this
by simply generating and switching to the org buffer before modifying
it. This commit no-ops file-template expansion in any org-capture
session, which should resolve these issues.

Fix: #6160
Fix: #6741
2023-02-22 20:47:51 -05:00
Layerex
5b2ea8c32f feat(file-templates): Add javascript "use strict" file template 2022-10-29 02:52:01 +02:00
Layerex
76caca0eaa feat(file-templates): Add javascript shebang file template 2022-10-29 02:52:01 +02:00
TEC
5ac2a5258b docs: change link format 2022-10-05 01:01:19 +02:00
Alex Birdsall
5ca8c75644 fix(file-templates): better recognize shell types
There are some conventional files strongly associated with a non-bash
shell which do not use an explicit `.zsh` file extension (e.g.
`.zprofile`); the old logic would always use the `#!/usr/bin/env bash`
shebang in these cases, which is a tiny little bummer.
2022-08-19 11:23:56 +02:00
Henrik Lissner
a5c80fcb4b
refactor: deprecate doom-private-dir for doom-user-dir
- Deprecates the doom-private-dir variable in favor of doom-user-dir.
- Renames the pseudo category for the user's module: :private -> :user.
- Renames the doom-private-error error type to doom-user-error.

Emacs uses the term "user" to refer to the "things" in user space (e.g.
user-init-file, user-emacs-directory, user-mail-address, xdg-user-dirs,
package-user-dir, etc), and I'd like to be consistent with that. It also
has the nice side-effect of being slightly shorter. I also hope
'doom-user-error' will be less obtuse to beginners than
'doom-private-error'.
2022-08-14 20:43:35 +02:00
Henrik Lissner
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
Henrik Lissner
b6ba1204bf
fix(file-templates): unescaped periods in regexps 2022-08-07 20:58:29 +02:00
Henrik Lissner
3ca74a1d5f
feat(file-templates): add .doomrc template
Ref: 9b8ed397e8
2022-08-07 20:57:55 +02:00
Henrik Lissner
1abcf913aa
revert: fix(docs): set mode in file-local vars
emacs-straight/org-mode@e22b4eb7aa introduced a breaking change that
made it impossible to rely on .dir-locals.el to change org-mode buffers
in $EMACSDIR to doom-docs-org-mode (without infinite recursion), so we
used file-local variables in 7e400ab.

emacs-straight/org-mode@215de6176b reverted that change, so we can use
.dir-locals.el again, and this is my preference, since it requires less
boilerplate across our hundreds of org files.

Ref: emacs-straight/org-mode@215de6176b
Ref: emacs-straight/org-mode@e22b4eb7aa
Revert: 7e400abdc0
2022-08-07 19:08:07 +02:00
Henrik Lissner
ba668f7cb0
fix(file-templates): indentation for licenses
And remove superfluous tabstops in gpl3 license.
2022-08-05 00:49:17 +02:00
Henrik Lissner
d6ffd2bfaa
fix(file-templates): update doom doc templates
To reflect the new mode: line added in 7e400ab, and add an ID property.
Also corrects heading level in __doom-readme file template.

Ref: 7e400abdc0
2022-08-04 01:15:23 +02:00
Henrik Lissner
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
Henrik Lissner
7e400abdc0
fix(docs): set mode in file-local vars
Due to emacs-straight/org-mode@e22b4eb, a replacement major mode (for
org-mode) can no longer be specified from .dir-locals.el, as it spirals
into infinite recursion. Therefore, a mode: line is needed in all Doom
docs.

Ref: emacs-straight/org-mode@e22b4eb7aa
2022-08-03 02:46:33 +02:00
Henrik Lissner
1255315bfc
refactor(docs): replace nav menus with virtual one
Now that the header is dynamically generated (when doom-docs-mode is
active), a literal header is unnecessary.
2022-08-02 19:37:07 +02:00
Henrik Lissner
e77a45bc22
docs: use lowercase keywords
As per Org's new defaults, which we're adopting elsewhere, so may as
well adopt it here.
2022-08-02 16:23:43 +02:00
Dominik Schrempf
b77699c38f nit(org): lower case keywords in file templates
See https://list.orgmode.org/87tuuw3n15.fsf@nicolasgoaziou.fr/.
2022-03-31 00:43:51 +02:00
Henrik Lissner
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
Ian Kerins
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
Layerex
169896e9ad tweak(file-templates): update default solidity template
- Added SPDX-License-Identifier
- Renewed default version pragma
2022-02-23 17:47:14 +01:00
Henrik Lissner
6ab43ff252
tweak(file-templates): use NAME <EMAIL> for Author: line
Instead of the github URL. No guarantee the user is a github user.
2022-02-23 15:23:14 +01:00
Henrik Lissner
7246db457c docs: replace doom-source with doom-repo links
I will later use "source" to refer to module sources, so better we avoid
the terminology for now.
2022-02-01 18:55:27 +01:00
Henrik Lissner
88844e9cec docs: simplify internal docs links
Fewer links means less confusion.

- Merge doom-issue and doom-commit links into doom-ref (for auto-linking
  Issue/PR/commit references).
- Merge doom-module-source and doom-docs-source links into doom-source.
- Rename doom-report-issue to doom-report.
- Use '!' as the icon for module issues link.
- Remove doom-repo (replaced with "doom:*" in :lang org module).
- Add doomdir and emacsdir links to :lang org module.
2021-11-21 20:04:28 +01:00
Henrik Lissner
9ada400805 docs(:editor): update READMEs to new format 2021-11-21 20:04:28 +01:00
Henrik Lissner
0aad1399cc refactor(file-templates): doom readme templates
Including readme template for categories.
2021-11-21 20:04:28 +01:00
Henrik Lissner
3106443707 fix(file-templates): +file-templates/debug
Command was previously inoperable (threw an error).
2021-10-18 01:15:09 +02:00
Sam Hedin
771b7147c9
revert: "Add set -euo pipefail to sh-mode file template"
Revert ce2fee138a
Close #5428
2021-09-23 11:36:09 +02:00
bartuka
b598d83aeb
feat(file-templates): add clojure gitignore template (#5357) 2021-09-14 14:27:55 +02:00
Henrik Lissner
d88948f764 fix(file-templates): github user in elisp packages 2021-08-16 11:36:09 -04:00
Henrik Lissner
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
Henrik Lissner
0ca34af323 feat(file-templates): improve diagnostic command
Emit a more helpful error message if a rule was found but yasnippet
can't find the associated snippet.
2021-08-02 15:00:44 -04:00
meltinglava
3eac1f4e8a removed unused use in "file-template rust main" 2021-06-23 22:52:27 +02:00
Seong Yong-ju
63cc08be98 lang/java: Add file templates
- `__annotation-type`
- `__enum`
- `__interface`
- `__record`
- `__` → `__class` (rename)
2021-06-05 23:21:53 +09:00
Joseph Morag
b20736c9b7 Add haskell gitignore template 2021-05-30 11:07:29 -04:00
Tomasz Andrzejak
704aa4ebde Remove double underscore from c header templates
Using double underscore for an identifier in C/C++ invokes undefined
behavior.

From https://eel.is/c++draft/lex.name:

Each identifier that contains a double underscore __ or begins with an
underscore followed by an uppercase letter is reserved to the
implementation for any use.
2021-03-16 10:16:33 +01:00
Sam Whitlock
86345887d8
Fixing the gpl template clash.
Need to escape the backticks that should appear as literals in the GPLv3 license.
2021-02-27 15:38:04 +01:00
Henrik Lissner
334e054ab0 Read username from git config github.user
Falls back to user-login-name otherwise.
2021-01-28 21:23:07 -05:00
Henrik Lissner
d0e7451de8
Merge pull request #4533 from danlamanna/fix-module-404s
Fix various broken links
2021-01-27 02:42:40 -05:00
Henrik Lissner
75ac7be289 Fix package-lint warnings in elisp package template 2021-01-18 17:53:59 -05:00
Dan LaManna
08354f3316 Fix various broken links 2021-01-17 15:08:21 -05:00