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
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`.
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
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@f51621adceClose: #8748
Co-authored-by: panchoh <panchoh@users.noreply.github.com>
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.
`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
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.
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.
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.
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
`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.
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
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
- 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.
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.
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
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
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
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.
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.
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.
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.
Warnings about unused lexical variables, arity warnings, unescaped
single quotes in docstrings, shadowed variables, and invalid value for
:local depending on Emacs version.