Commit graph

5085 commits

Author SHA1 Message Date
Henrik Lissner
6bd9c7c880 perf: run GC a little less aggressively
The delay will not be adjusted on a per-GC basis, depending on its last
run-time. This should average to around 2-3s, which should be a good
compromise between GCing too often and too infrequently.
2021-10-10 18:36:46 +02:00
Henrik Lissner
68d8364aea refactor: adopt CalVer and reorganize core.el
Doom is adopting CalVer (starting at 21.12) and, later, I'll move Doom's
core out to a separate repo, where it'll stay with SemVer (starting at
3.0).
2021-10-10 18:36:46 +02:00
Henrik Lissner
094b4c1023 refactor: move init helpers to core-lib
The functions have more general use-cases and should be considered part
of Doom's stdlib.
2021-10-10 18:36:46 +02:00
Henrik Lissner
91770b66e5 feat(lib): add :depth support to add-hook!
The semantics of add-hook's APPEND argument changed in 27.1: it was
replaced with DEPTH, which controls its exact order of the hook (and is
respected every time a function is added to a hook, throughout its
lifetime).

Includes a general refactor for add-hook! too.
2021-10-10 18:36:46 +02:00
Henrik Lissner
1ebac6f798 fix: fonts not scaling in childframes
On doom/increase-font-size and doom/decrease-font-size.

Fix #5591
2021-10-06 23:38:11 +02:00
Henrik Lissner
0b07264619 dev(ci): allow capitalization in revert commits
In case you're reverting an old commit, from before we adopted our git
conventions.
2021-10-06 01:30:45 +02:00
Henrik Lissner
5678a837dd fix(cli): void-variable comp-native-version-dir
There weren't enough checks that we were truly in a native-comp build of
Emacs. Not the most elegant solution, but the CLI rewrite handles this
far better so it'll do for now.

Fix #5131
2021-10-05 02:01:15 +02:00
Henrik Lissner
5541ee1c68 feat(cli): add -l/--load switch
Post-rewrite bin/doom will accept multiple -l's, but for now will only
accept one. This change was made to prepare for the documentation
generator, which will live outside the repo.
2021-10-05 02:01:15 +02:00
Henrik Lissner
ea404dfa45 fix(cli): rebuilding packages on every 'doom sync' 2021-10-03 19:24:46 +02:00
Henrik Lissner
328a145ffd fix(cli): void-variable comp-native-version-dir on 'doom purge'
This error would trigger on Emacs 28 (without native-comp).

Fix #5131
2021-10-03 12:08:42 +02:00
Henrik Lissner
d13816ce3e feat(lib): extend function deftypes in letf! macro
This adds support for two new definition types to the left! convenience
macro: defun* and defadvice.

First, defun* is for defining recursive, local functions (uses
cl-labels under the hood). e.g.

  (letf! (defun* triangle (number)
           (cond ((<= number 0) 0)
                 ((= number 1) 1)
                 ((> number 1)
                  (+ number (triangle (1- number))))))
    ...)

Second, defadvice is for defining temporary advice (which has a global
effect; it can later be improved to limit scope by redefining things
with cl-letf). e.g.

  (letf! (defadvice my-fixed-triangle (fn number)
           :around #'triangle
           (funcall fn (1+ number)))
    ...)
2021-10-01 19:30:56 +02:00
Henrik Lissner
0381c7868e fix: doom/reload not restoring initial envvars
'doom/reload' should and cannot regenerate the user's envvar file,
because it's not typically running in your shell, but it should reload
your existing envvar file.

Fix #5399
Ref #5344
2021-10-01 18:20:16 +02:00
Henrik Lissner
3ad9e39559 fix(lib): doom/reload-theme not reloading active theme
Rather than reloading whatever `doom-theme` is set to, reload the
currently active theme(s). Although `load-theme` is advised to change
the value of `doom-theme`, not all theme switching commands use
`load-theme` (e.g. `consult-theme`).

Fix #5539
2021-09-30 15:06:57 +02:00
Henrik Lissner
49c94dc78c docs(ci): document doom-cli-commit-rules 2021-09-30 15:06:34 +02:00
Henrik Lissner
e9b13393eb dev(ci): fix commit linter receiving empty summary
split-string is not side-effect free. It changes the match data (it uses
regexp to split strings).
2021-09-30 15:06:34 +02:00
Henrik Lissner
fbfa144347 docs: update doom-theme variable docstring
This variable no longer accepts 'default to load no theme. Set it to nil
instead.

Ref #5535
2021-09-29 18:34:21 +02:00
Henrik Lissner
1cbd1e14e1 dev(ci): fix commit hash length linter
- Now counts and reports all commit references that aren't the correct
  length, not just the first.
- Now reports all incorrect references, not just the first on each line.
2021-09-29 18:26:10 +02:00
Henrik Lissner
731ae806ea perf: pgtk-wait-for-event-timeout = 0.001
Thise should reduce the artificial latency added to window manager
operations (like calls to some of Emacs' frame API, e.g.
make-frame-invisible) on the PGTK build of Emacs. This should mitigate
latency issues with childframes in general and packages that use them,
e.g. lsp-ui and company-box.

There's also a small chance 0.001 is much too low, and may cause
artefacting on especially slow hardware. More testing is needed.
2021-09-29 17:50:30 +02:00
Henrik Lissner
1419b9dc41 feat: add doom/add-directory-as-project command
Will register any arbitrary directory as a projectile project, adding a
.project file to it if necessary.
2021-09-26 14:35:53 +02:00
Henrik Lissner
002711ff9b dev(ci): add pre-push git hook
To complain about lingering fixup/squash commits.
2021-09-26 14:35:53 +02:00
Henrik Lissner
dc3eb8a7cf dev(ci): ignore fixup!/squash!/wip commits
Otherwise the commit linter makes rebasing impossible without
--no-verify, or in magit if the git hooks are installed.
2021-09-26 14:35:53 +02:00
Henrik Lissner
2a0aa3d15b dev(ci): fix scope checker in commit linter
- Linter wasn't failing on any invalid scopes due to logic error.
- Linter was failing to recognize module categories as valid
  scopes (e.g. :lang, :ui, etc).
- Adds 'ci' and 'lib' as valid scopes.
2021-09-24 12:37:50 +02:00
Henrik Lissner
14729d21d1 dev(ci): refactor commit message reader for linter 2021-09-17 09:10:37 +02:00
Henrik Lissner
f80eed41bb dev(ci): fix linter complaining about git Ref lines
Such as Co-authored-by: and Signed-off-by: lines.
2021-09-17 09:10:14 +02:00
Henrik Lissner
5aeefc301b dev(ci): fix linter error on tail-less commit msg
If the commit message lacked the diff post-amble, 'doom ci
hook-commit-msg' would throw an out-of-range error.
2021-09-17 09:05:53 +02:00
Henrik Lissner
b3c01226a1 dev(ci): fix linter warning count 2021-09-17 09:05:42 +02:00
Henrik Lissner
2c5cc752ff fix(lib): preserve package order in after! macro
Prior to this, (after! (a b) ...) would expand to

  (after! b
    (after! a
      ...))

After this, it expands to

  (after! a
    (after! b
      ...))

This fixes load order issues with packages whose deferred configs are
nested, such as org and ob-ditaa.

Ref https://www.reddit.com/r/emacs/comments/pp3sye/hd311nz
2021-09-16 20:20:18 +02:00
Henrik Lissner
650f7a82e3 dev(ci): refactor commit linter
A new approach to make linter rules more flexible.
2021-09-16 20:20:10 +02:00
Henrik Lissner
f2588b0e90 feat(lib): imply &allow-other-keys in fn! macro 2021-09-16 20:20:08 +02:00
Henrik Lissner
aed9d0b7e5 fix: consult--grep call in load-path search commands
doom/help-search-load-path and doom/help-search-loaded-files were broken
by changes to consult--grep's interface upstream.

Ref 7762386e52
2021-09-15 17:47:17 +02:00
Henrik Lissner
dbe604519f bump: :core
Fuco1/smartparens@911cc896a0 -> Fuco1/smartparens@2834c66c4f
bbatsov/projectile@da08a9103b -> bbatsov/projectile@17c152b062
domtronn/all-the-icons.el@9d97c074b0 -> domtronn/all-the-icons.el@c0d288a41f
gilbertw1/better-jumper@411ecdf6e7 -> gilbertw1/better-jumper@7f328a886b
justbur/emacs-which-key@27d9fec33a -> justbur/emacs-which-key@4790a14683
raxod502/straight.el@b45dd00408 -> raxod502/straight.el@45eb6112b2
2021-09-15 17:47:17 +02:00
Itai Y. Efrat
a20cd88e8e refactor!(haskell): remove dante support
BREAKING CHANGE: Now that haskell-language-server is mature there is
little reason not to pick it over dante.
2021-09-15 01:56:26 +03:00
Henrik Lissner
6541ae5135 fix: revert x-select-request-type to default
Its default value is acceptable in 28+ and handles clipboard integration
in PGTK Emacs, so we don't have to.

Thanks to @sei40kr for revealing this fix to me (in #5219).

Fix #5219
2021-09-13 17:26:33 +02:00
Henrik Lissner
48239aeb97 fix(cli): git version check on Windows
Of course Git on Windows produces '2.33.0.windows.2'. Why wouldn't it?
2021-09-11 14:26:45 +02:00
Henrik Lissner
c298dc3ac7 refactor(doom-quit): distinguish flavor text in quit prompts
Makes it easier to tell apart flavor text from the actual prompt.
2021-08-16 15:01:22 -04:00
Henrik Lissner
462bfb9693 fix: doom/reload runs remotely in tramp buffers
When run in a remote buffer, `doom sync` is executed on the remote host,
which is not intended behavior.

Fix #5378
2021-08-14 02:29:46 -04:00
Daanturo
14f9289998
fix: wrong-number-of-args error in doom/reload-env
Close #5368
Ref 9687c04a84
2021-08-12 12:26:56 -04:00
Henrik Lissner
9687c04a84 fix: doom/reload 404ing on executables
Half-reverts c2c6a64, which tried to get doom/reload to regenerate the
envvar file from within Emacs, but running an environment scraper in a
bare environment is really hard to get right. Ideally, your shell config
should set up your environment, but there are too many edge cases or
poor configs in the wild to depend on this.

I've brought back doom/reload-env, but only to reload the envvar file
-- *not* regenerate it. I've given up on trying to do that from within
Emacs.

Fix #5344
Ref c2c6a64118
2021-08-11 01:50:42 -04:00
Henrik Lissner
2c4328ccf0 fix: flipped logic in tramp + projectile advice
Some logic derps from 0b5243c. Also restores
projectile-git-submodule-command in remote buffers (to fix a
wrong-type-argument error waiting to happen).

Ref 0b5243c12c
Ref #5360
2021-08-10 17:32:34 -04:00
Henrik Lissner
0b5243c12c perf: optimize tramp + projectile integration
Reduce how much projectile hits the server in TRAMP buffers by:

- Not looking for fd/fdfind (just use the VCS-specific commands
  projectile provides and assume they're present on the remote).
- Not walking up the directory tree to display the project name in the
  mode line.
- Reducing TRAMP file-cache misses.
- Reducing how chatty tramp is about its connections.

Fix #5360
2021-08-10 17:10:42 -04:00
Henrik Lissner
e76f5388be fix: doom-system-cpus not handling int values
ce31880 did not fix doom-system-cpus on msys2 builds because the
function didn't handle integer return values from any of its code
paths (which formerly returned strings or lists).

Ref ce31880ccc
Fix #5347
2021-08-06 03:44:34 -04:00
Henrik Lissner
1352f8a9aa fix: args-out-of-range when cleaning project cache
Caused when the key of a cached project is an empty string.

Fix #5345
2021-08-06 03:13:36 -04:00
Henrik Lissner
ce31880ccc fix: doom-system-cpus returning 1 on msys2 build
Fix #5347
2021-08-06 03:08:33 -04:00
Henrik Lissner
24866a17ee fix: void-variable arg error from doom/reload
Some leftover code from the doom/reload-env, which was removed in
c2c6a6411.

Ref c2c6a64118
Fix #5344
2021-08-05 12:54:37 -04:00
Henrik Lissner
abc16ef68c refactor(cli): make all searches case-sensitive
This is more predictable, and is safe as a global default in CLI
sessions (but not in interactive ones). This indirectly fixes case
insensitivity in our commit linter rules.
2021-08-05 12:53:20 -04:00
Henrik Lissner
a3f917c42d dev: fix off-by-one for line length rule 2021-08-04 10:46:10 -04:00
Henrik Lissner
045ea7460d nit: revise and reformat code comments 2021-08-04 01:53:12 -04:00
Henrik Lissner
06392a723f refactor: rename orig-fn arg in advice to fn
A minor tweak to our naming conventions for the first argument of an
:around advice.
2021-08-04 01:53:12 -04:00
Henrik Lissner
12732be155 feat: don't delay when opening auto-saved files
If a file has auto-saved data (see auto-save-default), after-find-file
will stop the world for 1 second to tell you about it. Very annoying.
Just log it to *Messages* and open the file immediately.
2021-08-04 01:53:12 -04:00
Henrik Lissner
c2c6a64118 fix: doom/reload now regenerates the envvar file
Removes doom/reload-env, now that it is redundant.
2021-08-03 23:00:43 -04:00