Commit Graph

831 Commits

Author SHA1 Message Date
Henrik Lissner
fbdde6b5f4 module!: add :editor whitespace
BREAKING CHANGE: Moves ws-butler, dtrt-indent, and whitespace defaults
out of Doom's core and into a new module. ws-butler is gated behind
+trim and dtrt-indent behind +guess. Users who depend on/like these
packages will need to enable the new module and their respective
flags (which is the default going forward).

This change is motivated by an ongoing effort to slim down Doom's
core (by (re)moving non-essentials from it).

This also addresses an issue where dtrt-indent would vastly increase
load times for some major-modes (e.g. elixir-mode & elm-mode, see #7537)
by restricting it to non-project files and non-read-only buffers AND
excludign those two major modes from indent guessing.

Fix: #8516
Fix: #7537
2025-09-24 02:23:30 -04:00
Henrik Lissner
7e711d53ca tweak(cli): only display the last, failed straight command
When displaying an package error.
2025-09-22 23:30:03 -04:00
Henrik Lissner
87a7efcea6 fix(lib): package!: add :env property
Allows the association of arbitrary envvars or variables with the build
artifacts of a package. If they change, the package is rebuilt on the
next 'doom sync'. This is a temporary measure, which is why this is not
touted as a new feature. It will be replaced in v3.
2025-09-22 23:30:03 -04:00
Henrik Lissner
1bc2af6ce5 fix(lib): remove black hole insertions
These inserts were writing nowhere.
2025-09-22 23:30:03 -04:00
Henrik Lissner
093488fcb7 fix(lib): dependence on hash-table insertion order
Yes, yes. I did a stupid here. I depend on the order of a hash table,
and sure enough, that came back to bite me when that changed internally
in Emacs 29. In practice, this meant packages were getting
installed/rebuilt in reverse order, which, besides some odd output
during 'doom sync' for users on 29+, didn't pose any overt issues, but
may have caused strange, inexplicable byte-code warnings/errors.

But, rather than do the smart thing and *not* do this, I do the next
best thing: procrastinate! Because the solution is non-trivial (I don't
control the hash table in question) and this is precisely the sort of
technical debt I've fixed in v3, and I'd really, *really* rather beat my
head on that wall, rather than this one.
2025-09-22 23:30:03 -04:00
Henrik Lissner
4de162108e feat: retry straight operations if they fail
Prior to this, we had some rudimentary retry logic for failed git clones
resulting in an empty repo, but it didn't respond to other legit
errors (like connection errors or legit remote failures). This one does,
retrying in more contexts.

Close: #8523
Co-authored-by: NightMachinery <NightMachinery@users.noreply.github.com>
2025-09-22 23:25:04 -04:00
Henrik Lissner
fb9b359dbe bump: nerd-icons
rainstormstudio/nerd-icons.el@3774e0578b -> rainstormstudio/nerd-icons.el@4036893c42

Fix: #8517
Revert: 3436b2c3ba
2025-09-21 22:47:39 -04:00
Troy Brown
fa6a2607b7 fix(lib): doom/sandbox: tree-sitter extra load path 2025-09-21 19:43:52 -04:00
Henrik Lissner
3436b2c3ba fix: nerd-icons: overeager gopher icon
Ref: rainstormstudio/nerd-icons.el#120
Fix: doomemacs/doomemacs#8517
2025-09-20 14:03:27 -04:00
Henrik Lissner
ba18967855 module: move :core to :doom
These stubs snuck into 037b018, but were supposed to be in
lisp/modules/* anyway.

Amend: 037b018cdd
2025-09-18 22:48:07 -04:00
Henrik Lissner
395a807aae refactor(lib): move fringe/fontset autodefs to doom-compat 2025-09-17 01:23:45 -04:00
Henrik Lissner
71ec9a9733 fix: backport treesit-available-p sooner
This fixes Doom for Emacs 27-28 users (or builds without treesit).
2025-09-15 18:53:31 -04:00
Henrik Lissner
5cfaf59402 refactor(cli): doom make: accept functions in make targets
A little less magical (and more performant) than interpolation.
2025-09-15 18:53:31 -04:00
Henrik Lissner
15a0e90808 fix(lib): doom-rcfile-read: ensure $PWD is the rcfile's dir 2025-09-15 18:53:31 -04:00
Henrik Lissner
b82b95e98d fix(cli): doom make: omit file path about output 2025-09-15 18:53:30 -04:00
Henrik Lissner
39534b3d87 bump: :doom
emacs-straight/project@a0ebb2e9cf -> emacs-straight/project@e8615777cb
radian-software/straight.el@25e0206541 -> radian-software/straight.el@e6d691d7c5
rainstormstudio/nerd-icons.el@6868c05c6e -> rainstormstudio/nerd-icons.el@3774e0578b
2025-09-15 18:53:30 -04:00
Henrik Lissner
b72fe2bd37 feat(lib): profiles: more portable load-path/Info-directory-list
The Emacs appimage generates a new mountpoint on each invokation, but
Doom's profiles assume that the Emacs directories don't move. To make
Doom's profiles a little more profile, it will no longer set `load-path`
and simply add the new paths to the existing one. Same for
Info-directory-list.

Consequently, this also seems to speed up startup times for ~8% in my
tests. Neat.
2025-09-15 18:53:30 -04:00
Henrik Lissner
c4ec232206 refactor: vc-ignore-dir-regexp: move to :emacs vc 2025-09-14 23:24:30 -04:00
Henrik Lissner
71eae252ac module: add :emacs tramp 2025-09-14 21:25:04 -04:00
Henrik Lissner
0d41af1ef7 fix(cli): doom make: remove extra stdout output
Amend: 18403ab521
2025-09-14 21:04:39 -04:00
Henrik Lissner
18403ab521 refactor(cli): doom make
Redesigns the 'doom make' command and the CODEOWNERS rule in
.doom (which is now obeyed on 'doom make .github/CODEOWNERS').
2025-09-14 16:25:12 -04:00
Henrik Lissner
282e781a51 feat(lib): add doom-rcfile functions
For reading .doom, .doommodule, .doomsource, .doomprofile, and
.doomprofiles files.
2025-09-14 16:25:12 -04:00
Henrik Lissner
84d5fa2b65 fix(lib): profiles: allow generators w/o an init function 2025-09-14 16:16:40 -04:00
Henrik Lissner
1e89556fa8 fix(lib): doom-file-read: (read . N) spec
Failed to read :by argument in '(read . ,N) form.
2025-09-14 11:52:29 -04:00
Tim Ruffing
2395228ff8 fix: Run hooks only after switch-to-buffer for server
When a file is visited via `emacsclient`, server.el does the following
in this order:
 - create a buffer `b` visiting the file
 - run `(set-buffer b)`
 - trigger `server-visit-hook`
 - run `(switch-buffer b)`
 - trigger `server-switch-hook`

Thus, the right hook for `doom-run-switch-buffer-hooks-h` is
`server-switch-hook` because the "switch buffer" hooks may assume that
the buffer has already been switched to.

This fixes an org error that occurs when running

    emacsclient --create-file --no-wait foo.txt

while there's a frame containing an org-roam file. Without this commit,
the server will create a new frame and set the current buffer to
foo.txt. But the new frame will still display the (duplicated) window
for the org-roam file. Then `server-visit-hook` will be triggered and
eventually run `+org-roam-manage-backlinks-buffer-h`, which will try to
enable the org-roam backlinks buffer. But this will error because the
current buffer is not an org(-roam) buffer.

Amend: 4a6de2419c
2025-09-11 23:30:01 -04:00
Henrik Lissner
c8d3d77b0b fix(cli): opt out of snapshots on Windows/BSD systems
At least until straight lets us customize the tar executable (or we add
a GNU tar check).
2025-09-09 23:45:30 -04:00
Henrik Lissner
26a5ad72e1 fix(cli): autoloads: type error parsing autoloads
Prevent rare edge cases where FORM is an atom, causing `cadr` to throw a
type error. Might explain some cases of `doom sync` doing nothing after
'> Generating N init files...'.

Amend: c014950f6d
2025-09-03 23:15:57 +02:00
Henrik Lissner
c014950f6d fix(cli): remove *-ts-mode {interpreter,auto}-mode-alist entries
While generating the autoloads for the current profile (at `doom sync`),
remove any `add-to-list` forms modifying `interpreter-mode-alist` or
`auto-mode-alist` in autoloaded `(when (treesit-available-p) ...)`
blocks. We want to fully rely on `major-mode-remap-defaults`.
2025-09-03 14:40:36 +02:00
Henrik Lissner
2443148f6d bump: :doom
radian-software/straight.el@8b3a54b247 -> radian-software/straight.el@25e0206541
2025-09-02 00:31:09 +02:00
Henrik Lissner
2d28328b43 fix(cli): handle snapshot packages
Don't execute git commands in snapshots.

Amend: 8cdddd87d9
2025-09-02 00:31:08 +02:00
Henrik Lissner
09f104795d release(modules): 25.10.0-dev
Ref: 2b39e41368
2025-09-01 22:01:54 +02:00
Henrik Lissner
a91f93a33a fix(cli): failure to repin packages installed from snapshots
When a pinned package is repinned, the package manager attempts to  `git
checkout` the new pin, which won't work if the package isn't a git
repo (see 8cdddd87).

Amend: 8cdddd87d9
2025-09-01 21:56:54 +02:00
Henrik Lissner
a1c307b441 fix(lib): doom/reload: quote $EMACS
With af4cbc7, escaping and quoting in $EMACS is now respected by
bin/doom; so make use of it to fix issues with $EMACS paths/commands
that contain spaces.

Ref: af4cbc7791d2
Fix: #8475
Fix: #8403
2025-09-01 14:24:12 +02:00
Henrik Lissner
5cda3ed25a merge: branch 'feature/treesit'
Fix: #7742
Fix: #7623
Fix: #7593
2025-08-31 14:55:37 +02:00
Henrik Lissner
98f03062b6 fix(lib): major-mode-remap backport for Emacs <30 users
`major-mode-remap`, `major-mode-remap-alist`, and
`major-mode-remap-defaults` were not backported correctly for Emacs 29,
28, and 27 users.

Amend: da08aa2d7d
2025-08-31 14:40:31 +02:00
Henrik Lissner
2e508c299d fix(cli): 'Failed to clone package' error
A regression introduced in 8cdddd8.

Fix: #8471
Amend: 8cdddd87d9
2025-08-30 18:35:05 +02:00
Henrik Lissner
8cdddd87d9 tweak(cli): download package archives by default
From this point on, Straight will download packages from tarballs (if
possible) from their associated forge rather than clone them as git
repositories. This is (marginally) faster and consumes significantly
less space. Doom treats its packages as build artifacts anyway.

This shouldn't cause any immediate breakage, but it may upset folks who
want their local package installs to be repositories. For them, this can
be reversed by simply adding this to $DOOMDIR/init.el:

  (after! doom-straight
    (setq straight-vc-use-snapshot-installation nil))

This only applies to packages installed after this point. Packages that
are already cloned as a repo will stay that way until the next time
they're uninstalled or reinstalled from scratch. Plus it only works on
systems that have `tar` in their $PATH *and* forges that are
supported (at the time of writing: github, gitlab, codeberg, bitbucket,
and sourcehut).

Ref: radian-software/straight.el@4241b63952
2025-08-30 13:40:06 +02:00
Henrik Lissner
4b9f237250 bump: :doom
bbatsov/projectile@0da59734fb -> bbatsov/projectile@9325c45e0f
emacs-compat/compat@2577cc74d9 -> emacs-compat/compat@cccd41f549
emacs-straight/project@de0deb8dbf -> emacs-straight/project@a0ebb2e9cf
emacsmirror/nongnu_elpa@9ee5a7657a -> emacsmirror/nongnu_elpa@67c49cfdf5
jscheid/dtrt-indent@015b26d6d6 -> jscheid/dtrt-indent@9108979357
noctuid/general.el@74d4541781 -> noctuid/general.el@a48768f85a
radian-software/straight.el@4128d42399 -> radian-software/straight.el@8b3a54b247
rainstormstudio/nerd-icons.el@d972dee349 -> rainstormstudio/nerd-icons.el@6868c05c6e
2025-08-30 13:39:39 +02:00
Jonas Jelten
7f8568ef31 refactor: remove workarounds for better-jumper
Ref: gilbertw1/better-jumper#2
Ref: gilbertw1/better-jumper#26
2025-08-30 00:49:00 +02:00
Jonas Jelten
e7a69dcdac feat(cli): ci/commit-msg: echo failed commit message
When you fail to provide a correct commit message, it may just become
lost without this adjustment.

(fun fact: this feature was used to fix its own commit message 4 times)
2025-08-29 17:59:35 +02:00
Henrik Lissner
4bd6d3553a docs: update emacs version prereqs (30.1 -> 30.2) 2025-08-23 11:52:16 +02:00
Henrik Lissner
0ed0072ff2 refactor(lib): doom/set-frame-opacity
Remove redundancies.

Ref: #8395
Amend: 2c18b61c99
2025-08-11 01:22:40 +02:00
Henrik Lissner
e3299d9359 release(modules): 25.09.0-dev
Ref: 2b39e41368
2025-08-10 15:34:44 +02:00
Henrik Lissner
2c18b61c99 feat(lib): set-frame-opacity: add FRAMES argument
Doesn't change the default behavior of the command, but adds an optional
FRAMES argument (a list of frames or `t` for all open and future
frames). If passed the prefix arg, FRAMES default to `t`, which applies
the opacity change to all open and future frames.

Close: #8395
Co-authored-by: lattarov <lattarov@users.noreply.github.com>
2025-08-10 15:34:43 +02:00
Henrik Lissner
9b1245708b fix(:term): type error if comint-last-output-start is nil
Ref: #8434
Close: #8443
Co-authored-by: DavidAlphaFox <DavidAlphaFox@users.noreply.github.com>
2025-08-10 15:34:43 +02:00
pancho horrillo
8b3894a94b fix(lib): update reference to deprecated alias 2025-08-09 22:35:34 +02:00
pancho horrillo
c2c4f74d3e fix(cli): update call using deprecated alias 2025-08-09 22:35:34 +02:00
DennieTeMolder
cf278cab55 fix(:term): ensure process-buffer is current 2025-08-09 22:33:20 +02:00
Henrik Lissner
ed9190ef00 fix(cli): infinite loop linting long lines in commits
Fix: #8425
2025-07-13 22:28:34 +02:00
Henrik Lissner
dd89efdb42 tweak(lib): doom-debug-variables: add epg-debug 2025-07-13 22:28:34 +02:00