Commit graph

17677 commits

Author SHA1 Message Date
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
0407621aff
refactor: deprecate EMACS2[89]+, NATIVECOMP, MODULES
To reduce redundancy, remove the maintenance hassle that version
constants would impose later on, and rely on built-in
facilities (featurep) more over global variables or doomisms, these
global constants have been deprecated in favor of Emacs "features":

- EMACS28+   -- replace with (> emacs-major-version 27)
- EMACS29+   -- replace with (> emacs-major-version 28)
- NATIVECOMP -- replace with (featurep 'native-compile)
- MODULES    -- replace with (featurep 'dynamic-modules)

(These constants will be formally removed when v3 is released. The IS-*
constants are likely next, but I haven't decided on their substitutes
yet)

I also decided to follow native-compile's example and provide features
for Emacs' system features (since system-configuration-features' docs
outs itself as a poor method to detect features):

- dynamic-modules
- jansson
- native-compile -- this one already exists, but will instead be removed
  if it's non-functional; i.e. (native-comp-available-p) returns nil.

These are now detectable using featurep, which is fast and built-in.
2022-08-14 20:43:35 +02:00
Henrik Lissner
c540f1b515
perf(lib): memoize doom-system-* functions 2022-08-14 20:43:35 +02:00
Henrik Lissner
3239ab8b2e
nit(mu4e): neutralize comments
Some of our comments/docs can come off as disparaging or snide. They're
glimpses of unfiltered frustration or snarky rubber ducking gone too
far, something I can totally sympathize with, as a scatterbrained
tinkerer, unwittingly made responsible for a lot of work that isn't mine
because of Doom's position as a middleman. But now that Doom has a
veritable userbase, I'd like to hold it to a higher standard.

Light-hearted banter and aired grievances in our source code,
documentation, or community are fine if focused on the problem or the
personal/shared experiences of the community (things that offer value or
amusement to others), but it is never acceptable to attack people or
their efforts. Especially not the very people on whose shoulders Doom
stands.

I sincerely apologize if these have offended you.

Amend: b07614037f
2022-08-14 20:36:42 +02:00
efim
02bb28dc82
fix(org): respect org-table-automatic-realign
Co-authored-by: efim <efim.nefedov@nordigy.ru>
2022-08-12 21:03:39 +02:00
joh13266
eb65ef169b fix(ocaml): ocaml tree-sitter function typo 2022-08-12 21:02:30 +02:00
Itai Y. Efrat
0e6682612f feat(default): use consult-flycheck when applicable 2022-08-12 21:01:56 +02:00
Henrik Lissner
12bf6baa21
fix: void-function doom-reset-file-handler-alist-h
A regression introduced in 1d8c61698b. Doom disables its
file-name-handler-alist optimization if in a daemon session or if debug
mode is active.

Fix: #6657
Amend: 1d8c61698b
2022-08-10 17:29:01 +02:00
Henrik Lissner
05b344a852
refactor: move nativecomp deny-list to doom-packages
Also removes $EMACSDIR/eln-cache from native-comp-eln-load-path, to
reduce any chance of this taking precedence later.
2022-08-10 14:13:46 +02:00
Henrik Lissner
61ff5a4421
refactor(cli): set __DOOMCONTEXT at runtime
Addresses the edge case where the user sets (or unsets) __DOOMCONTEXT in
their CLI config.
2022-08-10 14:10:08 +02:00
Henrik Lissner
de62c5449d
nit(vc-gutter): add summary tags to comments
A new convention I'm slowly rolling out to modules to help readers
quickly identify the purpose of a change. E.g.

  UX    - a change done to improve user experience
  STYLE - for aesthetics
  FIX   - addresses a perceived or potential issue
  PERF  - intended to improve performance

Combined tags will be delimited with commas. E.g. "UX,PERF:"

There may be more later, and these will be further documented in the new
docs about to come up.
2022-08-10 14:06:52 +02:00
Henrik Lissner
8191607093
refactor(cli): use more reliable means to assemble paths
Use filesystem to build or check paths, rather than regexps and string
concatenation.
2022-08-10 14:02:47 +02:00
Henrik Lissner
25ac752de2
fix(cli): file-missing error on comp-el-to-eln-filename
If you've moved $EMACSDIR, comp-el-to-eln-filename will throw errors
about missing directories/files, rendering 'doom sync' ineffective and
forcing the user to delete $EMACSDIR and reinstall Doom.
2022-08-10 13:18:34 +02:00
Henrik Lissner
7598485e1a
bump: :emacs vc
magit/magit@846d153a2e -> magit/magit@8a0cc83eff
magit/git-modes@62fbf2e5b8 -> magit/git-modes@eca3bb42ea
https://codeberg.org/pidu/git-timemachine@3381797bcbf9 -> emacsmirror/git-timemachine@ca09684e94

Moved to a git-timemachine mirror because codeberg.org has uptime
issues.
2022-08-10 13:18:34 +02:00
Henrik Lissner
118f0c416a
refactor(evil): replace evil-visual-update-x-selection advice
With the new evil-visual-update-x-selection-p setting.

Also adds a more descriptive comment to this design choice.
2022-08-10 13:18:34 +02:00
Henrik Lissner
bd597ffda4
docs(vc-gutter): document module's hacks 2022-08-10 13:18:34 +02:00
Henrik Lissner
99b0b70c49
fix(vc-gutter): remove advice removal for diff-hl-overlay-modified
Originally, this intended to *stop* diff-hl from too aggressively
deleting the diff overlays while editing. This is either no longer the
case or the old advice was mistaken; the intended behavior is achieved
without it.
2022-08-10 13:18:34 +02:00
Henrik Lissner
d55d7f3088
feat(vc-gutter): shrink revert-hunk popup to contents 2022-08-10 13:18:33 +02:00
Henrik Lissner
2ff8228133
fix(docs): handle missing autoloads file in core doctor
Instead of a long winded backtrace about a missing autoloads file, let
the user know a 'doom sync' is needed.
2022-08-10 13:18:08 +02:00
Henrik Lissner
a0a4aa81c1
fix(vterm): +vterm/toggle creating duplicates
If vterm-buffer-name-string is set to non-nil, then vterm will rename
the buffer after it is initialized. Since +vterm/toggle looks up buffers
by name, it will lose track of them, causing it to create a new one on
each invocation. With this, it will no longer lose track of them.

Fix: #6651
2022-08-09 17:18:35 +02:00
Henrik Lissner
4cf5ae8be1
fix(literate): tangling loop on 'doom sync'
Why the setenv call wasn't persisted into session restart (#6642) needs
further investigation, but for now this seems to solve the issue.

Fix: #6642
2022-08-09 17:12:56 +02:00
Henrik Lissner
24623f9959
refactor!(dired): move diff-hl config to :ui vc-gutter
BREAKING CHANGE: users who are used to diff-hl displaying diffs in dired
will notice they have vanished. diff-hl's conig has been moved to :ui
vc-gutter +diff-hl (added in 27a448b). Enable it to get it back.

Ref: 27a448b04b
2022-08-09 16:30:43 +02:00
Henrik Lissner
e76f327e0a
fix(vc-gutter): apply +pretty to diff-hl-dired-mode
Amend: cd9bc5a1fd
2022-08-09 16:30:43 +02:00
Henrik Lissner
e30eb03f83
refactor(vc-gutter): remove redundant hooks
The refresh hooks address the stage/unstage cases already.
2022-08-09 16:30:43 +02:00
Henrik Lissner
15b00b78fe
refactor(vc-gutter): use local modes instead of global 2022-08-09 16:30:43 +02:00
Bruce D'Arcus
b06fd63dcb bump: :tools biblio
andras-simonyi/citeproc-el@9f783967c1 -> andras-simonyi/citeproc-el@406bd9964f
emacs-citar/citar@b24b5b94b7 -> emacs-citar/citar@146f2cb5a3
tmalsburg/helm-bibtex@aa775340ba -> tmalsburg/helm-bibtex@ce8c17690d

Also add citar-embark, which now contains the embark functionality in a
separate minor mode package, and explicitly add parsebib, so we can pin
the precise version.
2022-08-08 23:41:06 +02:00
Henrik Lissner
13b3304c08
bump: :lang org
emacs-straight/org-mode@5a49cc5f4f -> emacs-straight/org-mode@00adad9357
hakimel/reveal.js@039972c730 -> hakimel/reveal.js@e219184f37
oer/org-re-reveal@f184e66e39 -> oer/org-re-reveal@6f78a0a228
org-roam/org-roam@e435581215 -> org-roam/org-roam@7f453f3fff

- Fixes "Variable binding depth exceeds max-specpdl-size" error when
  opening Doom's docs in doom-docs-org-mode. See 1abcf91.

Ref: 1abcf913aa
2022-08-08 22:28:14 +02:00
Henrik Lissner
b763c5b992
fix: file-name-handler-alist ignoring user changes
Unsetting file-name-handler-alist around a `load` call prevents any
change to this variable from surviving that file's evaluation (e.g. by
packages loaded therein). Since the user's config files are loaded with
this macro, this affects users' configs, which is unacceptable.

Since this optimization is already done in early-init.el, we can get
away with being more selective here.
2022-08-08 22:20:11 +02:00
Henrik Lissner
1d8c61698b
fix: "symbol's value as variable is void: \213" error (part 2)
See 6f1c0f7cc7 for part 1.

Turns out startup.elc likely exists on most Emacs installations (and,
since it's so integral to Emacs, it likely gets special treatment), so
it was a poor heuristic for this fix. Instead, a more variable target
would be calc-loaddefs.el.

On some systems, only calc-loaddefs.el.gz exists (in which case, we
should turn off the optimization). On others, calc-loaddefs.el
exists (so I'll assume it's safe to leave them on). I won't check for
calc-loaddefs.elc because it doesn't matter; calc.el explicitly
calls (load "calc-loaddefs.el") so it is never loaded.

Of course, you can sidestep the entire issue by building Emacs with
--without-compress-install, but it's not practical for users to
know/want to do that.

Amend: 6f1c0f7cc7
2022-08-08 22:19:18 +02:00
Henrik Lissner
6f1c0f7cc7
fix: "symbol's value as variable is void: \213" error
Some installs of Emacs do not come with byte-compiled versions of its
bundled elisp files, so when loading them, Emacs falls back to loading
its *.el.gz files. This would be fine if it were not for a  startup
optimization Doom employs, where it sets file-name-handler-alist to
nil (and by doing so, robs Emacs of the ability to read compressed
elisp). This causes "symbol's value as variable is void: \213" errors at
startup.

With this commit, Doom now disables this optimization early if it
suspects this applies to your install. But time will tell if it's early
enough.

Ref: https://mail.gnu.org/archive/html/emacs-devel/2022-08/msg00234.html
2022-08-08 18:52:32 +02:00
Henrik Lissner
f0e508b52d
bump: :lang ocaml
diml/utop@5d72a0ab34 -> diml/utop@bbd9a6ed45
flycheck/flycheck-ocaml@8707a7bf54 -> flycheck/flycheck-ocaml@77f8ddbd9b
ocaml-ppx/ocamlformat@9324ea439a -> ocaml-ppx/ocamlformat@9cbd8150c2
ocaml/dune@4bc7629a5e -> ocaml/dune@3df932f7f9
ocaml/merlin@5d59c70659 -> ocaml/merlin@be753d9412
ocaml/tuareg@04f5ab6be9 -> ocaml/tuareg@ad8a688b7e

Fix: ocaml-ppx/ocamlformat#2120
Close: #6639
Co-authored-by: tjammer <tjammer@users.noreply.github.com>
2022-08-08 18:47:13 +02:00
Jeetaditya Chatterjee
1b56675819 docs(tree-sitter): update highlights configuration 2022-08-08 18:37:20 +02:00
Jeetaditya Chatterjee
8e68cd5ffd feat(tree-sitter): conditionally enable ts-hl-mode
Based on the new variable `+tree-sitter-hl-enabled-modes`

This allows for people to use tree sitters tools without having
to use it for highlighting.
Useful because some modes (such as web-mode and its derivatives) do a
better job than the tree sitter alternative in this respect.
2022-08-08 18:37:20 +02:00
Peter Hoeg
4f23a02877 feat(terraform): support terragrunt 2022-08-08 18:35:46 +02:00
Abdelhak Bougouffa
d8c8f04f2f docs(vertico): add +childframe flag 2022-08-08 18:35:10 +02:00
Henrik Lissner
0ebf254f4e
fix(org): enable evil-org-mode in doom-docs-org-mode
So (evil) readers can get its benefits too.
2022-08-08 18:24:56 +02:00
Henrik Lissner
7c9d7a4551
fix(literate): report failures clearly
If tangling failed, it would do so silently, continuing on with the
'doom sync'. This causes a visible error instead, aborting the 'doom
sync'. Unfortunately, org-babel-tangle doesn't appear to produce any
errors, so this our error message can't be improved at this stage.

Fix: #6642
2022-08-08 18:23:47 +02:00
Henrik Lissner
9c04998e9c
tweak(cli): load doomrc quietly 2022-08-08 18:23:47 +02:00
Henrik Lissner
9c80b33b89
tweak: suppress defvaralias warnings 2022-08-08 18:23:47 +02:00
Henrik Lissner
27a448b04b
feat(vc-gutter): add +diff-hl backend
This adds an alternative backend to the :ui vc-gutter module, enabled
with the +diff-hl flag. In the future, I intend for diff-hl to replace
git-gutter, as it is slightly faster and depends on more native
functionality (vc.el), but it's still a little buggy. It will remain
opt-in until those issues are sorted out.
2022-08-08 18:23:47 +02:00
Henrik Lissner
cd9bc5a1fd
refactor!(vc-gutter): move style defaults behind +pretty
BREAKING CHANGE: This changes moves its default configuration of the
fringe behind a +pretty flag. This won't cause breakage, but will cause
a (possibly unwanted) visual change: git-gutter will use its default
indicators (e.g. + and - symbols) instead of the continuous bars from
before.

To get back the old look, enable `+pretty` on the `:ui vc-gutter`
module.

This was done to make the defaults toggleable, to standardize +pretty,
to document issues with this customization that have been brought up by
members of the Emacs community, and to better document it in comments
for posterity.
2022-08-08 18:23:47 +02:00
Henrik Lissner
232e9d4b91
fix: use --strip-cwd-prefix only if fd >=8.3.0
Since fd 8.3.0 has low availability across distros (see repology link
below), I don't want to make it Doom's minimum supported version.
Instead, I do a quick version check and adjust accordingly. I'll think
up a more elegant solution after v3.

Ref: https://repology.org/project/fd-find/versions
Fix: #6618
Fix: #6600
Close: #6597
2022-08-08 18:23:46 +02:00
Henrik Lissner
08eb6b555b
test: remove unused tests for core
These were unused, and rewritten versions are waiting to be
pushed (after v3), so let's get rid of some unneeded baggage.
2022-08-08 17:52:39 +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
0f43c3eed5
fix(docs): org-glossary init
- Set org-glossary-global-terms buffer-locally,
- Move org-glossary init into a hook.
- Remove unneeded (require 'ox) (see tecosaur/org-glossary#6),

Ref: tecosaur/org-glossary#6
2022-08-07 19:43:28 +02:00
Henrik Lissner
8ec9e7ea0d
nit(docs): reformat and annotate
- Rename doom-docs--display-header-h -> doom-docs--display-menu-h to
  better represent what it does.
- Add comments to describe the purpose of lib/docs, and TODO annotations
  to hint at its future and remind me later.
2022-08-07 19:43:28 +02:00
Henrik Lissner
034ade0468
fix(lib): doom-debug-mode forgetting initial values
Of the variables that it changes (see doom-debug-variables).
2022-08-07 19:43:28 +02:00
Henrik Lissner
48e54d3d48
dev: add CODEOWNERS config to .doomrc & regenerate it 2022-08-07 19:43:28 +02:00
Henrik Lissner
9b8ed397e8
feat!(cli): load project .doomrc instead of ci.el
BREAKING CHANGE: Before, 'doom ci' would load
$GIT_WORKING_TREE/.github/ci.el, to give users/projects an opportunity
to provide project-local configuration for bin/doom (mainly for CI/CD).
Now, this ci.el file is no longer loaded and instead, *all* bin/doom
sessions will walk up the file tree and load the first .doomrc it finds.

This gives bin/doom users a more general place configure all of its
commands, and not just 'doom ci' commands.

Extras:
- Adds .doomrc to auto-mode-alist (so that it starts in
  emacs-lisp-mode).
2022-08-07 19:43:28 +02:00