Commit graph

516 commits

Author SHA1 Message Date
Henrik Lissner
95e0b43012
fix: "Malformed pattern in custom ignore file .project" error
I introduced '--ignore-file .project' to `projectile-git-fd-args` in
4fcf332  expecting fd to ignore the file if it didn't exist, but it
throws an error if it doesn't, causing it to throw these errors in any
project without a .project file.

Amend: 4fcf332749
2024-08-12 19:46:40 -04:00
Henrik Lissner
f5020a4f7f
refactor: simplify projectile config
Reverts projectile-project-root-files-bottom-up to its original value,
since the absence of those VC entries may surprise folks who aren't new
to projectile.
2024-08-09 21:21:26 -04:00
Henrik Lissner
d04e1404c2
fix: projectile: ignore more vc directories in file listings 2024-08-09 21:03:46 -04:00
Henrik Lissner
4fcf332749
refactor: generalize fd/ripgrep vars & options
I intend to eventually replace projectile with project.el, so these
doom-projectile-* variables need to be generalized, starting with the
fd/ripgrep executable paths.

ALong with that, this refactors Doom's projectile-generic-command to
lean more on built-in fd support in projectile, where possible (fewer
wheels reinvented).

Ref: doomemacs/core#1
2024-08-09 21:03:37 -04:00
Henrik Lissner
939fc0d322
feat: add project-vc config
I intend to keep `project-vc-extra-root-markers` much lighter than what
`projectile-project-root-files` ended up being, so I won't be
transferring all the root markers.

Ref: doomemacs/core#1
2024-08-09 20:50:51 -04:00
Henrik Lissner
a6df88a56a
feat(lib): doom-org-docs-mode: bind q to kill-current-buffer
For consistency with other help modes.

Fix: #7985
2024-08-08 17:26:58 -04:00
Henrik Lissner
e3fdfee1c5
feat(cli): add --aot option
Allow ahead-of-time native-compilation during CLI operations that
install or update packages. This will not retroactively native-compile
already-installed packages, you'll need to use --rebuild to do so.

(This is a stop-gap solution until the v3.0 release)

Fix: #6811
2024-08-08 17:26:54 -04:00
Ilya Gladyshev
2c17f71965
fix(cli): don't prompt to rebuild if --rebuild is given
When running `doom sync --rebuild` after emacs upgrade the user is
prompted with "Installed packages must be rebuilt. Do so now?", even
though doom was explicitly instructed to rebuild. This PR removes this
prompt when the `--rebuild` option is provided
2024-08-06 13:02:13 -04:00
Henrik Lissner
cf7098528d
release(modules): 24.09.0-dev
Ref: 2b39e41368
2024-07-30 17:40:22 -04:00
Henrik Lissner
07f88f94ea
fix: improve startup error message
Showing `user-init-file` in the startup message seems more confusing
than helpful, especially to beginners, as it's not a file they can (or
should) be editing to fix whatever caused the error. Plus, its value
could be `t` if the error happens late enough in the startup process,
which is even less helpful.
2024-07-30 17:40:22 -04:00
Henrik Lissner
b163c21fe5
fix(cli): --force: handle more straight prompts
Fix: #7906
2024-07-28 15:21:13 -04:00
Henrik Lissner
54a084fed7
fix(cli): some package files not being byte-compiled
Fix: #7707
Ref: radian-software/straight.el#1132
2024-07-26 04:46:54 -04:00
Henrik Lissner
5852b2ecf5
fix(cli): properly overwrite last line of output
Before this, text that extended past the new line's length would
persist, causing garbled output like this:

  > Ensuring packages are installed and built...
    > Updating recipe repos...
    > Cloning org-appear...r emacsmirror-mirror...
    - No packages need attention

Which might lead you to believe org-appear is being cloned from
emacsmirror-mirror, but the full output is actually:

  > Ensuring packages are installed and built...
    > Updating recipe repos...
      > Updating recipes for melpa...
      > Updating recipes for nongnu-elpa...
      > Updating recipes for gnu-elpa-mirror...
      > Updating recipes for el-get...
      > Updating recipes for emacsmirror-mirror...
    > Cloning org-appear...
    - No packages need attention
2024-07-26 04:46:54 -04:00
Henrik Lissner
98a3cad54d
docs: minor docstring revisions
For clarity only. These do not reflect any recent changes.
2024-07-18 22:38:59 -04:00
Henrik Lissner
bd728fd2a8
fix(lib): doom-project-find-file: fall back to find-file if DIR is empty
Fix: #7949
2024-07-16 11:06:39 -04:00
Henrik Lissner
7543b04e15
feat(format): add +format/org-block-in-region
Also updates `+org/reformat-at-point` to call
`+format/org-block-in-region` if selection is active.

Fix: #7936
2024-07-14 01:57:20 -04:00
Henrik Lissner
378d0b8db6
fix(cli): doom env: omit XDG_BACKEND & DOOMLOCALDIR 2024-07-14 00:45:42 -04:00
Henrik Lissner
8ab42fa774
nit: revise site-lisp comments
The motivations for delaying the site-lisp files are different between
interactive and non-interactive sessions. I've revised these comments to
reflect that.
2024-07-13 19:38:16 -04:00
Henrik Lissner
20ee90614a
nit(cli): revise comment over site-run-file loader
To better explain to the wondering reader why we're loading site-start
here.
2024-07-11 21:53:38 -04:00
Henrik Lissner
12dc195774
fix: kill-current-buffer: respect kill-buffer-query-functions
This advice is intended to fake the death of buffers that are visible in
other windows, and prevent Emacs from switching to a non-real buffer
after it's killed/buried. It shouldn't even try to do any of this if
`kill-buffer-query-functions` fails, even if it is a fake death.
2024-07-11 15:22:12 -04:00
Henrik Lissner
86517122bd
bump: :core
Fuco1/smartparens@f7cf316715 -> Fuco1/smartparens@ab475c7891
emacs-compat/compat@80dbd9bc5e -> emacs-compat/compat@09dce8a193
emacs-straight/project@bf4c3cfcfb -> emacs-straight/project@093f42a1b6
jscheid/dtrt-indent@939c5e374a -> jscheid/dtrt-indent@339755e4fb
justbur/emacs-which-key@ed38931217 -> justbur/emacs-which-key@38d4308d11

Fix: #7939
2024-07-11 14:19:54 -04:00
Henrik Lissner
a6ba70aed7
fix(lib): avoid writing customized faces to custom.el (take 4)
This time, the faces weren't being applied if THEME == 'user (for
`custom-set-faces!`).

Amend: afb9773d7c
Ref: #7929
Ref: #7933
2024-07-11 03:18:48 -04:00
Henrik Lissner
c2c241666b
fix(lib): autoload doom--run-customize-theme-hook
In case the user byte-compiles any files where custom-theme-set-faces!
is used.

Amend: afb9773d7c
Ref: #7929
Ref: #7933
2024-07-10 16:00:16 -04:00
Henrik Lissner
afb9773d7c
fix(lib): avoid writing customized faces to custom.el (take 3)
Wrap doom-customize-theme-hook and use that wrapper also when the local
doom--customize-themes-h-* hook is called immediately, otherwise
settings will be written to custom-file, which is what I've been trying
to avoid with all these takes!

Amend: 0b13525252
Ref: #7929
Close: #7933
Co-authored-by: real-or-random <real-or-random@users.noreply.github.com>
2024-07-10 15:57:35 -04:00
Henrik Lissner
0b13525252
fix(lib): avoid writing customized faces to custom.el (take 2)
Setting custom--inhibit-theme-enable to t isn't enough, since
custom--should-apply-setting will return non-nil if THEME is 'user.

Ref: #7929
Amend: 68771150ba
2024-07-10 04:22:48 -04:00
Henrik Lissner
68771150ba
fix(lib): avoid writing customized faces to custom.el
`custom-theme-set-faces!` calls `custom-theme-set-faces`, which will
mark the customizations for saving to custom.el. But
`custom-theme-set-faces!` is not intended for permanent customizations.
I fix this by setting `custom--inhibit-theme-enable` to prevent some of
the extra work `custom-theme-set-faces` does around changing faces, and
call face-spec-set manually.

Also renames doom--custome-theme-set-face to doom--normalize-face-space,
to better reflect what it does.

Close: #7929
Co-authored-by: real-or-random <real-or-random@users.noreply.github.com>
2024-07-10 01:46:57 -04:00
Henrik Lissner
fe0548e820
tweak: unbind SPC in y-or-n-p prompts
SPC is equivalent to y when y-or-n-p prompts you, which seems way too
easy to hit by accident, especially with our leader key being (or
involving) SPC by default.
2024-07-09 21:53:50 -04:00
Henrik Lissner
8bd6b8ab68
perf: suppress local-vars hooks in temp buffers
Doom inserts some expensive hooks in MODE-local-vars-hook, like
triggering LSP servers, tree-sitter, or visual enhancements -- things
that are unnecessary in temporary (invisible) buffers, so I suppress
them altogether there.
2024-07-09 20:56:35 -04:00
Henrik Lissner
e43d575caf
refactor(lib): don't use smartparens' API
Toward our eventual goal of moving smartparens out of core, I've adapted
this from code provided by hpfr on Discord, which was adapted from
smartparen's syntax-ppss caching logic. `:config default` will need need
some attention before we can fully move smartparens to its own `:editor
smartparens` module.

Co-authored-by: hpfr <hpfr@users.noreply.github.com>
2024-07-09 20:55:29 -04:00
Henrik Lissner
944eef90ec
fix(lib): doom-plist-merge causing side-effects
This one was sneaky. `doom-plist-merge` was mutating the second plist
fed to it, causing issues upwind of its uses. In #7925, for example,
calling `doom-package-recipe` to read a package's recipe would end up
altering it, copying sub-properties of :recipe to other packages'
recipes.

If you've hit #7925, you'll also need to delete your build-cache to get
around the error. I.e.

  rm -f $EMACSDIR/.local/straight/build-*-cache.el
  doom sync  # or upgrade

Fix: #7925
2024-07-09 02:46:53 -04:00
132ikl
d7075b2420
tweak(lib): doom-project-find-file: use transient project
If DIR is not a project and does not have root markers, create a
transient project instead. This ensures that `project-find-file-in`, and
by extension vertico, is still used in non-project directories instead
of falling back to `find-file`

Ref: 1b0af3bfc7
2024-07-06 20:16:59 -04:00
Henrik Lissner
1cc83dce35
fix(cli): wrong-number-of-args error on choosing 'abort'
Fix: #7917
2024-07-06 20:13:38 -04:00
Henrik Lissner
b767beaca6
fix(lib): don't call doom-adjust-font-size twice
When doom-big-font-mode is deactivated.
2024-07-05 20:10:57 -04:00
woochica
6e69b29084
fix(lib): reset font size before setting big font mode
Calling (doom-adjust-font-size 1) repeatedly would keep increase the
font size because an increment is passed.

When loading themes, the doom-big-font-mode minor mode gets loaded again
therefore it causes the font to get increased.

Fix: #7845
2024-07-05 18:58:18 -04:00
Henrik Lissner
481753bd5e
refactor!: remove pcre2el package
BREAKING CHANGE: This removes the pcre2el package, which Doom was using
solely for one function to escape PCREs. In the interest of thinning out
Doom's core, I've hoisted a simpler version of the function into Doom's
stdlib so I can remove the dependency.
2024-07-01 18:11:34 -04:00
Henrik Lissner
25d0b4065f
dev: format CODEOWNERS with more whitespace
Affects the result of 'doom make codeowners'
2024-07-01 03:35:35 -04:00
Henrik Lissner
d75f9be0d4
release(modules): 24.08.0-dev
Ref: 2b39e41368
2024-06-30 16:18:07 -04:00
Henrik Lissner
ae9e1feaa6
refactor: avoid needless macro calls
Avoid macros where we really don't need them.
2024-06-28 17:00:58 -04:00
Henrik Lissner
c4ee986818
docs: fix badges & update 29.3->29.4
29.4 (an emergency maintenance release) was released on June 22, 2024.

Fix: #7910
2024-06-28 17:00:58 -04:00
Henrik Lissner
83aa40797e
fix(cli): suppress secondary prompts from straight on -!/--force
The -!/--force flags suppress straight's 'how to proceed' prompts, but
not the secondary ones like 'Really delete remote "origin"?'. This fixes
that.

Fix: #7906
2024-06-28 17:00:58 -04:00
Henrik Lissner
a24ff58a5a
fix(lib): don't kill buffers visible in another frame
For Doom's kill-current-buffer advice.
2024-06-26 23:21:06 -04:00
Henrik Lissner
5c50b65e95
bump: ws-butler
hlissner/ws-butler@572a10c11b -> lewang/ws-butler@e3a38d93e0

I switch back to upstream ws-butler to reduce maintenance burden, and
because the two issues my fork resolves are now resolved upstream, in
doom-modeline (see lewang/ws-butler#31). I also change
ws-butler-keep-whitespace-before-point to its default for #7843.

Revert: c59ae5d172
Ref: lewang/ws-butler#31
Close: #7843
Fix: #7516
2024-06-23 15:56:17 -04:00
Henrik Lissner
d84111927c
fix(lib): doom/bumpify-diff: ignore malformed package! statements
To avoid 'uneven number of packages be bumped' errors in some edge cases
where this isn't true.
2024-06-22 18:14:05 -04:00
Henrik Lissner
7e7d8ebdfd
fix(lib): print!: don't resolve printed symlinks 2024-06-22 18:14:05 -04:00
Henrik Lissner
703173a6d2
feat(lib): doom-print: allow lexical redirection 2024-06-22 18:14:05 -04:00
Henrik Lissner
17119c5df7
refactor(lib): tweak user-error messages
To make these errors more consistent with similar commands/operations,
as well as rely less on cl-check-type (cl-lib's understanding of the
`font` type is a bit odd; they'd emit warnings/errors about this, but
still perform the checks -- I opted to check more explicitly instead).
2024-06-22 18:14:05 -04:00
Henrik Lissner
b405225b90
refactor!(vc-gutter): drop git-gutter for diff-hl
BREAKING CHANGE: This removes git-gutter as an implementation for the
`:ui vc-gutter` module, leaving only the diff-hl implementation. There
are no longer any +git-gutter or +diff-hl flags for this module. Users
don't have to do anything to keep the vc gutter, unless they prefer
git-gutter for any reason (in which case they'll need to install and set
it up themselves).

This has been planned for some time, because of a roadmap goal for Doom
to lean into native/built-in functionality where it's equal or better
than the third party alternatives. diff-hl relies on the built-in vc.el
library instead of talking to git directly (thus expanding support to
whatever VCS's vc.el supports, and not git alone), which also means it
can take advantage of its caching and other user configuration for
vc.el. Overall, it is faster and lighter.

What I've also been waiting for was a stage-hunk command, similar to
git-gutter:stage-hunk, which arrived in dgutov/diff-hl@a0560551cd and
dgutov/diff-hl@133538973b, and have evolved since.

Ref: dgutov/diff-hl@a0560551cd
Ref: dgutov/diff-hl@133538973b
Ref: https://github.com/orgs/doomemacs/projects/5/views/1?pane=issue&itemId=58747789
2024-06-22 18:14:04 -04:00
duli
7fe642938d fix: 'doom sync' generates autoload files for symbolic link files
* lisp/lib/autoloads.el(doom-autoloads--scan) Remove invoke
`file-truename` of file, keeping symbolic from being converted to a real
path.
* lisp/doom-modules.el(doom-module-from-path) Replace
`file-in-directory-p` with `string-match` to determine the module to
which the file belongs.

Fix: #7821
2024-06-21 17:52:45 -04:00
Henrik Lissner
9116ec2ec7
release(modules): 24.07.0-dev
Ref: 2b39e41368
2024-06-20 18:29:15 -04:00
Henrik Lissner
39588a15f6
bump: :core
Fuco1/smartparens@a5c68cac1b -> Fuco1/smartparens@f7cf316715
Wilfred/helpful@a32a5b3d95 -> Wilfred/helpful@4ba24cac9f
emacs-straight/project@93aa1872e9 -> emacs-straight/project@bf4c3cfcfb
jscheid/dtrt-indent@5d1b44f9a1 -> jscheid/dtrt-indent@939c5e374a
justbur/emacs-which-key@1e89fa000e -> justbur/emacs-which-key@ed38931217
2024-06-20 18:28:13 -04:00