Commit graph

971 commits

Author SHA1 Message Date
Henrik Lissner
678efcb2fb
revert: fix: use relative :height for non-default faces in doom-init-fonts-h
OP's fix only addressed an issue caused by their particular theme, not
by Doom. The underlying issue is how brittle the face remapping API is,
and how easily themes can throw a wrench into it (and therefore
`variable-pitch-mode`, `mixed-pitch-mode`, `text-scale`, and just about
any package that uses face remapping).

If your theme explicitly inherits faces from one or more of the
following: `default`, `fixed-pitch`, or `variable-pitch` (like
modus-themes does if `modus-themes-mixed-fonts` is enabled) or assigns
faces a hardcoded :height (like modus-themes does if
`modus-themes-headings` is enabled), you will run into edge cases with
face-remapping, and there's little that middleware like Doom to catch
them all.

Ref: #8756
Revert: #8733
Revert: 11a022f68f
2026-04-19 05:14:54 -04:00
unship
860a91aaac
fix(lib): doom/help-packages: paths for codeberg packages
Treat `codeberg` recipes like other git hosts when inferring local repo
names in `doom-package-recipe-repo`. This makes `doom/help-packages`
show the correct "Repo location" (e.g. for `eat`) instead of `n/a`.
2026-04-17 00:30:45 -04:00
Henrik Lissner
81fbc39f70
docs: don't suggest 'doom sync' to recompile doom.el
Doom doesn't compile its source files (yet), so if doom.el is compiled,
the user has done this out-of-band, and it's up to them to recompile it
however they did it. `doom sync` won't do this (at least, not until v3).

Fix: #7132
2026-04-11 03:29:14 -04:00
Henrik Lissner
e286783034
fix: projectile-files-to-ensure sets default-directory to nil
A recent change in projectile causes `projectile-files-to-ensure` to set
`default-directory` to nil in buffers with no valid project root,
poisoning `default-directory` anywhere it is used downstream (e.g. if
`projectile-project-root` is called again, which it is, later in the
same function's call chain).

So override `projectile-files-to-ensure` to fall back to the current
working directory when no project root is found, at least until it's
addressed upstream.

Amend: a55d6ad958
Ref: bbatsov/projectile@f51621adce
Close: #8748
Co-authored-by: panchoh <panchoh@users.noreply.github.com>
2026-04-10 17:17:16 -04:00
Henrik Lissner
91864558b0
refactor: remove ansi-color-for-comint-mode setting
It already defaults to `t`.
2026-04-09 22:38:26 -04:00
Henrik Lissner
bde6fc6a26
refactor: hoist doom-run-first-hooks-if-files-open-h to doom-finalize 2026-04-09 22:38:26 -04:00
Henrik Lissner
d6caad2948
refactor: s/when-let/when-let*/
Amend: 4fe1cbeddb
2026-04-09 22:30:28 -04:00
Henrik Lissner
f950926c88
fix(lib): package!: exclude underscore prefixed :env vars
The condition was reversed, omitting variables we wanted.
2026-04-06 22:21:03 -04:00
Henrik Lissner
eeabbbb9dc
fix(cli): add commit linter scopes/types for project
This is temporary until v3, where project-specific rules will be moved
to .doom (they're already there, but Doom's CLI doesn't read the file
yet).

This fixes the commit linter for this project.
2026-04-03 15:58:50 -04:00
Henrik Lissner
738321be8d
feat(lib): package!: add :freeze
And :freeze the two packages that are currently frozen.

Ref: #8702
Ref: #6080
2026-04-03 15:01:01 -04:00
Henrik Lissner
297b8d5788
fix(lib): doom-set-indent: detect *-ts-indent-offset vars
Such as zig-ts-indent-offset.
2026-04-02 22:38:20 -04:00
Henrik Lissner
598ee8ad81
fix(cli): upgrade: failure to fetch Doom on tagged commits
`git name-rev` prefers annotated names (like tags) when they point to a
commit, and `doom upgrade` was expecting a branch name from it (but gets
"tags/v2.1.0" if you're upgrading directly to 4f4911f).

Fix: #8735
Amend: 4f4911fed9
2026-04-02 03:58:20 -04:00
Henrik Lissner
548d164e1b
fix: s/3.0.0-pre/2.1.0/ in deprecation warnings
Amend: 4f4911fed9
2026-04-01 23:52:01 -04:00
Henrik Lissner
4f4911fed9
release: 2.1.0
The v3 dev branch will go live soon. Once it does, the current master
will be put into maintenance mode until v3 is ready for a formal
release.

I won't be merging v3 into master because it introduces breaking changes
that I users shouldn't blindly `doom upgrade` into. Once v3 is ready for
adoption, `doom upgrade` will emit an announcement that v2 is EOL and a
link to a migration guide.

In the meantime, this branch needed a distinct version to set it apart
and to better reflect its state in the chronology of this project, so it
is now v2.1. Using 3.0.0-dev was poor foresight on my part; v3's
codebase has diverged significantly from v2's, so it's weird to pretend
that master represents a release candidate, or is anywhere close to the
actual state of v3.
2026-04-01 21:26:27 -04:00
Henrik Lissner
9597cf8056
release(modules): 26.05.0-dev
Ref: 2b39e41368
2026-04-01 21:03:58 -04:00
Henrik Lissner
fb1194b141
tweak: read-extended-command-predicate = command-completion-default-include-p
Filters irrelevant commands from M-x by default. That is, commands that
aren't relevant to the current major mode, or have custom `completion`
declarations that return nil. This includes functions that are
:override/:around advised to `ignore`, which unintentionally makes them
interactive.
2026-04-01 20:24:00 -04:00
Henrik Lissner
80c4e0498e
refactor: native-comp-eln-load-path setter
This does the equivalent of `startup-redirect-eln-cache` (which isn't
available until 29).
2026-04-01 17:42:44 -04:00
Henrik Lissner
e72bcdcf7c
fix(lib): set-indent-vars!: non-list MODES argument
Forgot to rebase this back into 1bdcb81 before it was pushed.

Amend: 1bdcb81feb
2026-03-31 21:16:10 -04:00
Henrik Lissner
a725ba4a1b
docs: remove v3 demo for doom!
This syntax has changed slightly since, but in any case it's premature
to have this in `doom!`s demos before v3 is out.
2026-03-31 21:07:09 -04:00
Henrik Lissner
1bdcb81feb
refactor!(lib): set-indent-vars!: change signature
BREAKING CHANGE: Changes `set-indent-vars!`s arity from 1+N to 2, so:

  (set-indent-vars! 'some-mode 'var1 'var2 'var3)

To

  (set-indent-vars! 'some-mode '(var1 var2 var3))

In preparation for a plist argument in the future.
2026-03-31 21:06:58 -04:00
Henrik Lissner
eb40bec314
fix(lib): doom-set-indent: handling nil or undefined vars
When indent variables registered with `set-indent-vars!` aren't defined
or are nil when `doom-set-indent` is called.

Fix: #8730
Amend: 5e290e8e79
Amend: c0662f6ea1
2026-03-31 21:06:11 -04:00
Ag Ibragimov
11a022f68f fix: use relative :height for non-default faces in doom-init-fonts-h
`set-face-attribute ... :font font` bakes in an absolute :height from
the font-spec's :size. This means fixed-pitch, fixed-pitch-serif, and
variable-pitch all get absolute heights (e.g. 160 for a 16pt font).

`doom/increase-font-size` adjusts doom-font and calls
`doom-init-fonts-h` to propagate, but because these faces carry their
own absolute height they don't track the default face -- rendering font
scaling ineffective for anything inheriting from them.

Convert non-default faces to relative :height (ratio to default) right
after setting :font and before `custom-push-theme` snapshots the value.
2026-03-31 21:05:19 -04:00
Henrik Lissner
5e290e8e79
fix: recognize more non-standard indent variables 2026-03-28 05:15:15 -04:00
Henrik Lissner
d5d5bfaddf
refactor: drop igc pseudo-feature
I'm supposed to be cutting down on these (see 1a943aea), but then
a629b15 happened. I sometimes lose the plot managing two divergent
branches of this project.

Ref: 1a943aea69
Amend: a629b154cc
2026-03-27 19:46:25 -04:00
Henrik Lissner
129187458d
refactor: s/doom-partial/apply-partially/
Favor built-in APIs instead of superfluous aliases.
2026-03-27 07:03:37 -04:00
Henrik Lissner
252b8dc8f4
fix(lib): unused lexical variable nomessage
Appease the byte-compiler.
2026-03-27 07:03:37 -04:00
Henrik Lissner
7a068accbf
perf: gc-cons-percentage = 1.0 during startup 2026-03-27 07:03:37 -04:00
Henrik Lissner
78129e4727
bump: :doom
rainstormstudio/nerd-icons.el@9a7f44db9a -> rainstormstudio/nerd-icons.el@1db0b0b920
2026-03-26 20:03:37 -04:00
Henrik Lissner
ba511fcbfb
fix(lib): provided-mode-derived-p calls on Emacs <=29
This function's signature changed in 30.1:

Before: (mode &rest modes)
After:  (mode &optional modes &rest old-modes)

So use forms that are forwards compatible with its new signature.

Fix: #8721
2026-03-24 02:20:15 -04:00
Henrik Lissner
84f1eef8b0
refactor: hl-line config
- Generalize the auto-toggle when activating and deactivating a
  selection.
- Optimize `global-hl-line-buffers` predicate by consolidating it into
  one function call and fewer buffer context switches. Important,
  because this predicate is executed frequently.
- `doom-temp-buffer-p` > `string-match-p`, performance-wise.
2026-03-23 23:57:55 -04:00
Henrik Lissner
4d73f4bcb3
refactor(lib): remove doom/{issue-track,discourse} commands
Rather than maintain these little commands, let the Github repo and
upcoming homepage serve as the project's online nexus.
2026-03-22 18:49:24 -04:00
Henrik Lissner
cb639fb159
bump: :doom
bbatsov/projectile@4469d33f49 -> bbatsov/projectile@f8be23b266
emacs-straight/project@11a821c652 -> emacs-straight/project@041a69d062
2026-03-20 21:55:21 -04:00
Henrik Lissner
0d35240e70
refactor: large file optimizations
Fixes the large-file detection and rewrites it to lean more on the
built-in `so-long` library to detect and handle "large" files (whose
line count exceeds a given threshold). This removes the various
`doom-large-*` variables, replacing them with
`doom-file-lines-threshold-alist`, which defaults to 15-25k lines for
all modes, depending in the presence of IGC or native-comp.

I also no longer do this large file detection in 28 or older, because
it's not worth the trouble to maintain. Users that care about
performance should be on 30+ anyway.
2026-03-20 21:52:52 -04:00
Henrik Lissner
a629b154cc
feat: support for MPS garbage collector (igc)
And remove/disable gcmh if running the IGC build.
2026-03-19 18:39:02 -04:00
Henrik Lissner
25e4c73137
tweak: compilation-max-output-line-length = nil
Scanning each line can slow the compilation buffer down for long-running
and verbose processes.

Ref: doomemacs/community#87
2026-03-19 03:13:06 -04:00
Henrik Lissner
c093595947
perf: compilation: rate-limit comint-truncate-buffer
comint-truncate-buffer preforms expensive line-wise operations on every
line of output in the compilation buffer. This can exponentially slow
down every additional line of output thereafter. To get around this, I
relpace it with a version that rate-limits it until the compilation
buffer has grown large enough.

This may still have issues in cases where the underlying processes
produce long *and* ultra wide lines at the same time.

Ref: doomemacs/community#87
2026-03-19 03:13:06 -04:00
Henrik Lissner
1b1838e160
perf: comint: no-op advice in read-only buffers
Like compilation-mode buffers, so they don't impact their performance.
2026-03-18 19:31:49 -04:00
Henrik Lissner
e368d2da14
fix(lib): doom-indent: if multiple indent vars are nil
In the odd edge case where one (or more) of the indent vars are set to
nil (e.g. misconfiguration via `set-indent-vars!`).
2026-03-18 19:31:48 -04:00
Henrik Lissner
370777f398
fix(lib): doom-indent: void-variable errors
I was too optimistic using intern-soft as a soft-boundp check.

Fix: #8714
Amend: c0662f6ea1
2026-03-15 21:56:08 -04:00
Henrik Lissner
c0662f6ea1
feat(lib): introduce set-indent-vars! & doom-indent API
Introduces a systemic fix to the problem where most major modes don't
set `tab-width` and/or `standard-indent` to match the mode-specific
indent variables. This tries to guess the indent variable(s) for any
given major mode, by searching for variables that end in:

  X-ts-mode-indent-offset
  X-indent-offset
  X-indent-level
  X-tab-width
  X-basic-offset

Where X is the major mode without the (base-)?(ts-)?-mode suffix. This
should resolve to the correctly variable for most popular or newer
packages. For modes where it isn't enough, modules will have to manually
register with `set-indent-vars!`.

This commit also moves various indent commands to a new
lisp/lib/indent.el library and rewrites `doom/set-indent-width` to use
this new API (which no longer depends on editorconfig, and less on
dtrt-indent).

Fix: #8713
2026-03-15 02:23:40 -04:00
Henrik Lissner
2df631ff58
refactor: introduce doom-auto-revert-mode
This originally consisted of four hooks, intended to be a more
performant alternative to the built-in `{global-,}auto-revert-mode`.
However, users who don't want this behavior needed four relatively
obscure `remove-hook` calls to fully it. With this, folks only need:

  (remove-hook 'doom-first-file-hook #'doom-auto-revert-mode)

Or can toggle `doom-auto-revert-mode` directly.

After v3, I plan to move this functionality into a module.

Ref: doomemacs/community#86
2026-03-15 02:16:30 -04:00
Henrik Lissner
165032cfec
refactor(lib): remove doom/dumb-{de,in}dent commands
These two commands aren't used anywhere and the specifics of how
people *want* these sort of commands to work are so specialized and
niche that ours are unlikely to suit most people's needs. As an
alternative, Evil users already have `evil-shift-right` and
`evil-shift-left`, and vanilla users can `(setq tab-always-indent nil)`,
among *many* other possible choices.
2026-03-14 23:08:45 -04:00
Henrik Lissner
3a2c12073f
refactor: s/set-debug-variable!/set-debug-var!/
There will be more of these set-variable-type autodefs in the future, so
I'd rather make the abbreviation of "variable" the precedent now than
destructively rename them all later.
2026-03-13 17:42:00 -04:00
Henrik Lissner
3381577fb2
fix(lib): doom/reload-autoloads
The regexp test was not matching any files (which aren't absolute
paths).
2026-03-13 02:02:57 -04:00
Henrik Lissner
ff75c10550
fix(lib): doom/reload: isolate reload environment more
To resist contamination from the current buffer or environment (e.g. due
to direnv). Also, ensure `doom-after-reload-hook` is executed, even if
the reload process fails.
2026-03-13 01:58:30 -04:00
Henrik Lissner
698d52276e
perf: avoid doom-fallback-buffer in doom-first-buffer-hook trigger
Calling `doom-fallback-buffer` pulls in lisp/lib/buffers.el a sooner
than needed. `doom-fallback-buffer-name` on the other hand is defined
much sooner.
2026-03-13 01:50:56 -04:00
Henrik Lissner
f2257c3fa9
fix: defcustom :type specifiers
setopt throws a void-function nil error if a variable's :type specifier
is invalid.

Fix: #8710
2026-03-12 16:29:37 -04:00
Henrik Lissner
a28c5f6eef
fix(cli): remove unused lexical var
The var was removed in 73d643d and isn't used elsewhere, so...

Amend: 73d643da83
2026-03-11 23:11:52 -04:00
Henrik Lissner
2c412fb310
fix: straight: respect :branch in package! statement
Amend: 7902c08729
2026-03-11 22:50:33 -04:00
Henrik Lissner
73d643da83
fix: appease byte-compiler across the board
Warnings about unused lexical variables, arity warnings, unescaped
single quotes in docstrings, shadowed variables, and invalid value for
:local depending on Emacs version.
2026-03-11 22:50:33 -04:00