Commit graph

1549 commits

Author SHA1 Message Date
Henrik Lissner
aa8c31cf08
fix(vc-gutter): wrong-number-of-args error
A regression introduced in ded3f5e.

Fix: #8009
Amend: ded3f5ec83
2024-08-21 12:57:28 -04:00
Henrik Lissner
ff9c59df46
tweak(vc-gutter): disable diff-hl-mode in pdf-view-mode 2024-08-21 05:04:25 -04:00
Henrik Lissner
ded3f5ec83
fix(vc-gutter): runaway diff-hl threads & immortal buffers
This was an elusive bug caused by two upstream behaviors:

1. `kill-buffer` will silently refuse to kill a buffer if there is a
   thread associated with it.
2. `global-diff-hl-mode` activates `diff-hl-mode` in *most* buffers,
   even invisible ones. This calls `diff-hl-update` each time
   it does. This isn't a problem *unless* you have `diff-hl-update-async`
   enabled, because it creates a thread every time `diff-hl-update` is
   called. That means for every buffer -- real or transient -- you have
   a new thread queued.

And this caused two main issues:

1. Temporary buffers are often opened and closed very rapidly (often
   faster than the thread can complete), so they weren't getting cleaned
   up. I hope you weren't too attached to your memory, because you'll
   have a lot of buried buffers to feed before long!
2. In cases where `diff-hl-update` simply takes a long time, multiple
   calls to it would queue more threads. When Emacs eventually yields
   the CPU to them, you'll get random,
   impossible-to-predict-or-track-down freezes. Joy!

This may very well be enough reason to disable `diff-hl-update-async` by
default, but I didn't want to give up on it *just* yet, despite how
inelegant this solution is...

Fix: #7954
Fix: #7991
2024-08-21 05:03:30 -04:00
Henrik Lissner
bf330b405d
refactor(ligatures): use (featurep 'harfbuzz)
Doom adds this feature in lisp/doom.el.
2024-08-20 00:09:55 -04:00
Henrik Lissner
0ce403d069
refactor(ligatures): set-font-ligatures!: unsetting multiple modes
This changes set-font-ligature such that unsetting multiple modes will
properly manipulate multi-mode entries in ligature-composition-table.
2024-08-20 00:03:50 -04:00
Henrik Lissner
ef142fc913
refactor(ligatures): defer ligature.el & combine variables
This combines `+ligatures-prog-mode-list` and `+ligatures-all-mode-list`
into `+ligatures-alist` (and deprecates the former).
2024-08-20 00:03:50 -04:00
Henrik Lissner
dff6c36ab5
docs(ligatures): use set-font-ligatures! 2024-08-20 00:03:49 -04:00
Henrik Lissner
a8ed6c9f7d
fix(vc-gutter): inhibit diff-hl-dired-mode in dirvish
Ref: #6760
2024-08-17 14:24:51 -04:00
Henrik Lissner
5e2e886b35
nit: comment revision & reformatting 2024-08-15 23:18:47 -04:00
Henrik Lissner
334157d741
fix(popup,org): popup management for org-mode
Adapts to changes made upstream to Org's window management logic (e.g.
Org dropped `org-switch-to-buffer-other-window` for
`switch-to-buffer-other-window`, and org-journal renamed one of its
helper functions).
2024-08-09 17:41:48 -04:00
Henrik Lissner
b3bea23331
fix(workspaces): "none" workspace
Doom removes the "none" workspace from persp-mode's default list of
perspectives, because it is a special case that doesn't behave
identically to other persps in the list, making it a pain to deal with.

This worked fine up until a change to `persp-update-names-cache` (in
Bad-ptr/persp-mode.el@0d6cacc) made it re-insert this "none" workspace
into `persp-names-cache` whenever it is called, undoing our hack; this
commit adapts to that change.

Ref: Bad-ptr/persp-mode.el@0d6caccab3
Ref: Bad-ptr/persp-mode.el@b2e68f97cb
Fix: #7986
Amend: 7f3412e317
2024-08-09 15:42:54 -04:00
Henrik Lissner
7f3412e317
bump: :ui
Alexander-Miller/treemacs@54ef590b76 -> Alexander-Miller/treemacs@202d7f01d6
Bad-ptr/persp-mode.el@345baaa520 -> Bad-ptr/persp-mode.el@40e9993a97
dgutov/diff-hl@57d9d4e3e1 -> dgutov/diff-hl@b80ff9b4a7
ema2159/centaur-tabs@d6009c295a -> ema2159/centaur-tabs@063534bd00
emacs-lsp/lsp-treemacs@1d43e9e030 -> emacs-lsp/lsp-treemacs@fb1a07ae0a
emacs-straight/minimap@4898d27768 -> emacs-straight/minimap@5aa0df40bc
seagle0128/doom-modeline@1505c13564 -> seagle0128/doom-modeline@9920ef5116
tarsius/hl-todo@dd46d426c0 -> tarsius/hl-todo@82eba6b8f7
2024-08-08 17:26:58 -04:00
Henrik Lissner
9cdcfdac36
feat(workspaces): add +workspace/delete
For deleting saved workspaces (saved with `+workspace/save` or
`+workspace-save`).

Also binds `SPC TAB D` (for evil users) and `C-c w K` (for non-evil
users) to it.

Fix: #4399
Close: #7869
Co-authored-by: sriramsk1999 <sriramsk1999@users.noreply.github.com>
2024-07-29 20:57:56 -04:00
Henrik Lissner
0f30e1eca5
bump: :ui vc-gutter :tools magit :emacs vc
dgutov/diff-hl@f66345ed1f -> dgutov/diff-hl@57d9d4e3e1
magit/forge@9edfcb2c15 -> magit/forge@21d410c810
magit/magit@9d4192b7b1 -> magit/magit@e777822720
2024-07-29 02:03:25 -04:00
Henrik Lissner
5f798cf8e7
feat(indent-guides): add +indent-guides-inhibit-functions
Also adds a fix for indent-guides breaking inline images in
ein:notebook-mode (#6438).

Fix: #6438
Ref: 29277c9b02
2024-07-29 02:03:25 -04:00
Dan McArdle
ff3fd15b02 fix(vc-gutter): check 'diff-hl-disable-on-remote is bound
This fixes the following error message on startup:

    Symbol’s value as variable is void: diff-hl-disable-on-remote
2024-07-26 16:29:34 -04:00
Henrik Lissner
dec2a387ad
fix(modeline): remove advice causing org-element cache errors in org
This advice was suppressing ws-butler's modification hooks, which had a
nasty side-effect of modifying org buffers without letting its
org-element cache know that it's stale, which resulted in errors like
this, followed by a backtrace:

  Warning (org-element): org-element--cache: Unregistered buffer modifications detected (175 != 176). Resetting.
  If this warning appears regularly, please report the warning text to Org mode mailing list (M-x org-submit-bug-report).

The advice isn't needed anymore, anyhow.
2024-07-26 04:46:54 -04:00
Henrik Lissner
7c5d8641a1
fix(vc-gutter): respect diff-hl-disable-on-remote in dired
Neither `diff-hl-dired-mode` or `diff-hl-dired-mode-unless-remote`
respect diff-hl-disable-on-remote, so added my own enabler hook.
2024-07-25 19:43:28 -04:00
Henrik Lissner
a8b836dac3
fix(vc-gutter): use global-diff-hl-mode
Our former approach would enable diff-hl unconditionally. This way, the
`diff-hl-global-modes` variable is respected.

Ref: https://discourse.doomemacs.org/t/4710/2
2024-07-25 19:43:28 -04:00
Henrik Lissner
db36c74bbb
refactor: minor refactors 2024-07-18 22:38:59 -04:00
Henrik Lissner
f5a9f5d7ad
docs(popup): set-popup-rule!: update docstring 2024-07-18 22:38:59 -04:00
Henrik Lissner
58375306ad
bump: :ui doom
doomemacs/themes@188ab05eef -> doomemacs/themes@2c794a09b0
hlissner/emacs-solaire-mode@8ccdceeb92 -> hlissner/emacs-solaire-mode@c9334666bd
2024-07-16 22:33:16 -04:00
Henrik Lissner
3f66400d62
fix(treemacs): open last treemacs session if in $HOME or non-project
`treemacs-add-and-display-current-project-exclusively' seems to confuse
some people and please others when it is used in $HOME. To reduce
confusion, SPC o p will now resume from the last session if
default-directory isn't a valid project OR if it's $HOME. It will also
emit a warning informing them of that.

Fix: #7948
Amend: f9dfb7e92a
2024-07-16 11:23:11 -04:00
Henrik Lissner
5485b912de
bump: :ui vc-gutter
dgutov/diff-hl@11f3113e79 -> dgutov/diff-hl@f66345ed1f

- Our diff-hl-update-async hack is no longer needed. The issue was
  addressed upstream.

Amend: 778fc9ad3f
Ref: dgutov/diff-hl#213
Ref: dgutov/diff-hl@e264d13a3d
2024-07-15 00:23:31 -04:00
Henrik Lissner
778fc9ad3f
fix(vc-gutter): disable diff-hl-update-async in with-editor-mode
`diff-hl-update-async` was enabled in f2696d7, causing a regression
where with-editor buffers wouldn't get cleaned up properly. This would
particularly affect Magit's COMMIT_EDITMSG buffers. To quote jds on
Discord:

  It seems like after committing (with cc in the magit buffer), it
  leaves COMMIT_EDITMSG around. The next time I try & commit, a single c
  keypress immediately jumps to the old COMMIT_EDITMSG buffer, but it's
  inactive - C-c C-c closes that buffer but makes no change to git.

I opt for advice instead of find-file or with-editor-mode hooks to
restore normal behavior should with-editor-mode be later disabled
without the death of its buffer (not relevant to magit, specifically,
but it might be to other consumers of with-editor, now or in the
future).

Ref: dgutov/diff-hl#213
Amend: f2696d7302
2024-07-10 18:27:54 -04:00
Henrik Lissner
f1f72c291a
refactor(vc-gutter): simplify & DRY
These advice were unnecessary when not only does diff-hl expose
variables to change them, but one of the overridden definitions is
identical to the function it's replacing.

Also includes some other minor refactors.
2024-07-10 03:54:45 -04:00
Henrik Lissner
78304f4d79
perf(vc-gutter): optimize bitmaps
The NS build of Emacs (on MacOS) seems to struggle rendering our old
fringe bitmaps for diff-hl, leading to noticably slow-downs when
scrolling in buffers with diff-hl enabled. By pre-computing the pixel
height and width of the bitmap, rather than relying on passing `repeat`
to define-fringe-bitmap's ALIGN argument, this seems to spare it a chunk
of wasted cycles.

Ref: https://www.reddit.com/r/emacs/comments/1do1wgj/fringes_incredibly_slow_on_emacs_ns_with_macos/
Fix: #7923
2024-07-10 03:18:46 -04:00
Henrik Lissner
f2696d7302
perf(vc-gutter): diff-hl-update-async = t
Don't block Emacs when updating the gutter.

Ref: #7923
2024-07-08 22:16:05 -04:00
Henrik Lissner
5289861109
refactor(workspaces): +workspace/delete: rename to +workspace/kill
To be more consistent with other uses of the verb in the Emacs
ecosystem. Also done in preparation for a new +workspaces/delete command
for #7869.

Ref: #7869
2024-07-05 18:05:15 -04:00
Henrik Lissner
b08c2c745f
module: remove :ui hydra
This module has been deprecated for some time because it is too
trivially small, and it's always been unclear how hydra fits into Doom's
vision for its UI, but I intend to lean into either transient or Embark
in the future.
2024-07-05 18:03:56 -04:00
Henrik Lissner
d7f5e7033e
bump: :ui doom modeline
doomemacs/themes@816fb54d60 -> doomemacs/themes@188ab05eef
seagle0128/doom-modeline@11ae6c193c -> seagle0128/doom-modeline@1505c13564
2024-07-02 20:03:16 -04:00
Henrik Lissner
f9dfb7e92a
tweak(treemacs): use treemacs-add-and-display-current-project-exclusively
Folks seem to expect to *only* see the current project in the treemacs
pane when they open it. I sort of agree, so I've tweaked
+treemacs/toggle (on SPC o p) to use
`treemacs-add-and-display-current-project-exclusively` instead.

Fix: #7614
2024-07-01 18:10:06 -04:00
Henrik Lissner
42923be0b3
bump: :ui tabs
ema2159/centaur-tabs@4a121a175e -> ema2159/centaur-tabs@d6009c295a

Ref: ema2159/centaur-tabs@9f04a13db0
Revert: ea1f72e875
2024-06-28 17:00:58 -04:00
Henrik Lissner
3431ddd44c
refactor!(ophints): replace volatile-highlights w/ goggles
BREAKING CHANGE: This replaces volatile-highlights.el with goggles.el,
since the former is no longer maintained and the latter is a much
simpler implementation for the same functionality. No adjustments are
needed for end-users to adopt this change, unless they have
volatile-highlights-specific configuration.

Ref: https://github.com/orgs/doomemacs/projects/5/views/9?pane=issue&itemId=326184
Close: #7810
Co-authored-by: Dev380 <Dev380@users.noreply.github.com>
2024-06-23 15:56:18 -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
Henrik Lissner
62248f8366
bump: :ui
Alexander-Miller/treemacs@8c6df39f01 -> Alexander-Miller/treemacs@54ef590b76
dgutov/diff-hl@9662083943 -> dgutov/diff-hl@11f3113e79
doomemacs/themes@3b2422b208 -> doomemacs/themes@816fb54d60
emacs-lsp/lsp-treemacs@e54e74deb8 -> emacs-lsp/lsp-treemacs@1d43e9e030
emacs-straight/minimap@90aeeb5798 -> emacs-straight/minimap@4898d27768
jrblevin/deft@bb1a16b87c -> jrblevin/deft@b369d7225d
seagle0128/doom-modeline@e09b8e989f -> seagle0128/doom-modeline@11ae6c193c
tarsius/hl-todo@f1fef158f9 -> tarsius/hl-todo@dd46d426c0
2024-06-21 19:11:30 -04:00
Henrik Lissner
4f4718e6d1
bump: :ui tabs
ema2159/centaur-tabs@0bb1aa18d4 -> ema2159/centaur-tabs@4a121a175e

- Reverts some hacks that are no longer needed:
  - ema2159/centaur-tabs#231 makes 56f33bc7ed obsolete.
  - ema2159/centaur-tabs@2f6a5fbb8d makes 813c961511 obsolete.

Ref: ema2159/centaur-tabs@2f6a5fbb8d
Revert: 813c961511
Ref: ema2159/centaur-tabs#231
Revert: 56f33bc7ed
2024-06-21 17:59:42 -04:00
Henrik Lissner
ea1f72e875
fix(tabs): reload centaur-tabs when changing themes
Fix: #6503
2024-06-20 18:28:12 -04:00
Henrik Lissner
fddc912f81
fix(tabs): defer centaur-tabs-mode in daemon sessions
Fix: #6647
Fix: #7477
Close: #7276
2024-06-20 18:28:12 -04:00
Henrik Lissner
56f33bc7ed
fix(tabs): workaround for ema2159/centaur-tabs#231
`centaur-tabs-line-tab' reads `centaur-tabs-ace-jump-keys' without
length guards. If there are fewer entries than you have tabs, you'll see
an error (ema2159/centaur-tabs#231), and because the function is inlined
and monolithic, advising its behavior is non-trivial. This workaround
will mitigate it until it's dealt with upstream.

Ref: ema2159/centaur-tabs#231
2024-06-20 18:28:12 -04:00
André Silva
874b536892 fix(ligatures): set-font-ligatures! reset on nil 2024-06-20 18:20:31 -04:00
Henrik Lissner
f99863b9f5
bump: :ui doom
doomemacs/themes@37d2182f50 -> doomemacs/themes@3b2422b208
hlissner/emacs-solaire-mode@8af65fbdc5 -> hlissner/emacs-solaire-mode@8ccdceeb92
2024-04-07 16:10:39 -04:00
Henrik Lissner
69bc471722
fix(workspaces): dual *Warnings* windows at startup
At some point, either Emacs, persp-mode, or I fixed what caused #319,
which swallows the *Warnings* popup when the new main workspace is
created. Until I can determine what fixed it (so I can determine whether
the whole hack should go), I'll simply add this guard.

Ref: #319
2024-04-06 12:55:01 -04:00
gpanago
813c961511
perf(tabs): rate limit centaur-tabs-buffer-update-groups
`centaur-tabs-buffer-update-groups` walks every buffer to determine the
group it belongs to. This function can be called execessively (upwards
of 1,000 times per second in certain conditions), as it is called on
every redisplay (it is indirectly attached to `tab-line-format`). This
rate limits its calls to about 10 per second.

Close: #7792
Ref: ema2159/centaur-tabs#222
2024-04-06 00:21:59 -04:00
yuhan0
5589722c8e fix(popup): fix typo in local variable name 2024-04-01 13:28:49 -04:00
Henrik Lissner
a84462133d
fix(neotree): don't use all-the-icons
Fixes 'Package `all-the-icons' isn't installed' error when opening
neotree.

Ref: #7664
2024-04-01 13:16:36 -04:00
Henrik Lissner
45fd893074
refactor(ligatures): test for harfbuzz feature
A `harfbuzz` feature was introduced in 3e81655.

Ref: 3e81655b0e
2024-03-26 10:39:59 -04:00
Henrik Lissner
7acfb0c77c
nit: minor comment reformatting & revision 2024-03-26 10:39:24 -04:00
Henrik Lissner
90070c639a
fix(workspaces): remove ivy integration
Due to upstream changes in ivy-rich, +workspace/switch-to throws a
`wrong-type-argument listp leaf` error. As I plan to phase out Ivy
support (and the Ivy module) in the long term, I'll simply remove
ivy (and ivy-rich) integration in the workspaces module, rather than
update it.

Fix: #7499
Fix: #7173
2024-03-26 10:11:34 -04:00
tecosaur
cb6e3f0e89
fix(modeline,everywhere): adjust checker -> check
As part of the recent UI bump (665d808d09), the doom-modeline changed
the name of the "checker" segment to "check".

Amend: 665d808d09
2024-03-22 10:07:57 -04:00