Skip to content

New segments and introduce AI to improve performance

Latest

Choose a tag to compare

@seagle0128 seagle0128 released this 01 Dec 09:29
· 1 commit to master since this release

Breaking changes

  • doom-modeline-check-simple-format is removed and replaced by
    doom-modeline-check, which accepts auto (adapt to window width), full
    (all details), simple (counts only) or nil (hide the segment).
  • doom-modeline-project-name, doom-modeline-workspace-name and
    doom-modeline-persp-name now default to nil (previously t, or
    project-mode-line for the project name). Set them explicitly to restore the
    old mode-line. doom-modeline-project-name also accepts non-remote.
  • New mandatory dependency: timeout 2.1.6 (GNU ELPA), used to throttle
    word-count scans.
  • Removed doom-modeline-icon-displayable-p.
  • CI no longer covers Emacs 27.2 / 28.2; the matrix is 29.4, 30.2, 31.1 and
    snapshot.

New segments

  • spell: Flyspell information, gated by doom-modeline-spell.
  • minibuffer-depth: shown when the minibuffer depth is greater than 1.
  • keycast: key events while keycast-invisible-mode is on.
  • reader-pages: reader-mode document position, refreshed on navigation.
  • Speedbar segments (speedbar-name, speedbar-info): doom-modeline renders
    correctly inside the speedbar window and appends the project name.

Features

  • HUD: new doom-modeline-hud-width (thumb width in pixels).
  • New doom-modeline-unicode-number option for Unicode window numbers.
  • New project value for doom-modeline-buffer-file-name-style.
  • doom-modeline-remote-host controls whether the remote host is shown, and
    doom-modeline-project-name can skip remote buffers (non-remote).
  • doom-modeline-display-tab-bar-string displays
    doom-modeline-tab-bar-format-global, an alternative to tab-bar-format-global.
  • doom-modeline-vcs-remote-state-check avoids synchronous vc-state probing
    over TRAMP.
  • Worktree indicator: the VCS segment now marks buffers inside a git worktree.
  • Buffer state icon updates on focus change and periodically, and is shown even
    when doom-modeline-icon is disabled.
  • Selection information has an on/off option (doom-modeline-selection-info)
    and a throttled word count (doom-modeline-word-count-throttle);
    doom-modeline-enable-buffer-position can hide the position information.
  • Org Babel source blocks: src:N is shown next to the buffer position when
    doom-modeline-enable-src-line is non-nil.
  • Embedded Calc state is now part of the modal-state segment.
  • Evil modal state: toggle the state tag, customize modal state display, and
    refresh the overwrite/god icons.
  • IRC notifications: filter with doom-modeline-irc-priority-only, and support
    rcirc alongside circe and erc.
  • Minor modes: honor the mode-line-minor-modes variable.
  • Indentation: support for new indentation modes and Tree-sitter modes.
  • Package and info mode lines are improved.
  • The workspace segment now has a menu.
  • Programmatic segment management: doom-modeline-add-segment and
    doom-modeline-remove-segment.
  • Elixir version parsing fixed in doom-modeline-env.

Bug fixes

  • Faces: inactive-mode-line face inheritance, buffer-file and battery face
    inheritance, current-face-height-attr handling, and preserving multiple
    face properties without mutating cached text.
  • Icons: inactive-window icons not rendered (#827), empty/null icon handling,
    battery fallback icon for unrenderable statuses, and eglot icon face kept
    in sync with server state.
  • Frames and focus: frame focus delay issues, child-frame selection, unsetting
    the active modeline when a child frame is selected, and handle-switch-frame
    advice.
  • Check segment: Flycheck status validation and error handling (#819), safety
    checks for Flycheck/Flymake state, and cached check segment refresh.
  • VCS: prevent TRAMP hangs in git worktree detection (#813), correct codicon
    for the worktree indicator, and display git-timemachine modelines properly.
  • Battery: set battery-mode-line-string when updating status, tolerate
    unavailable status, run hooks after updates, and fix the LSP segment watching
    the wrong variable.
  • EOL indicators: use make-mode-line-mouse-map and omit separators for
    undecided EOL styles.
  • Encoding: do not add the separator for the default coding system.
  • PDF: page number now updates with pdf-tools continuous-scroll-mode (#803).
  • meow custom states are loaded eagerly (#791).
  • Selection info refreshes on cursor movement.
  • Speedbar modeline after choosing a directory (#785).
  • Right-alignment window margin calculation.
  • Removed inverse-video styling left in text properties (#817).

Performance

  • All segments now read redisplay-safe caches: word count, line count, buffer
    state icon, directory, selection and keymap data; a CI lint enforces the rule.
  • Check segment is rendered once and cached between redisplays; Flymake and
    Flycheck no longer rescan diagnostics on every window change (#848, #850).
  • Icon rendering is cached by arguments and options, with FIFO-bounded
    eviction, and the mode-line RHS is rendered once and measured on a copy.
  • Mode-line pixel width measurements are cached, as are buffer-file-truename
    and per-buffer file-name formatting.
  • Project root abbreviation is cached per buffer; project detection no longer
    reverts buffers.
  • Environment/version queries run once per buffer, are shared across buffers
    and are invalidated on change; the resolved command is reused.
  • VCS worktree state is cached and vc-state probing is skipped for remote
    files.
  • Full-buffer word counting and selection counting are throttled with
    timeout-throttle (doom-modeline-word-count-throttle).
  • Limited-width segments are optimized for narrow windows.

Internal, build and docs

  • Build migrated from Cask to Eask; Eask is the entry point for test,
    compile and package.
  • CI: added Emacs 31.1, moved the stable lane to Emacs 30.2, bumped
    actions/checkout, and added a segment redisplay-path lint.
  • New benchmark for the check segment (bench/check-segment.el), check tests
    merged into one file, and regression tests for the pixel-width cache.
  • New unit tests for doom-modeline-def-segment / doom-modeline-def-modeline,
    plus env, src-line and project-root test coverage.
  • AGENTS.md rewritten around the redisplay caching contract; README options
    updated for the new defaults and segments.
  • Copyright years updated to 2026.

What's Changed

  • Don't add separator when encoding is default with 'nondefault option by @deirn in #786
  • Add option to show selection information on modeline by @bormoge in #790
  • Allow lazy loading custom states by @ventruvian in #791
  • Add the ability to configure whether the remote host should be shown by @JeremyWeed in #793
  • feat: add alternative to tab-bar-format-global by @bormoge in #792
  • feat: add emacs-reader document position by @Icy-Thought in #796
  • feat: update reader-mode pages on navigation by @Icy-Thought in #797
  • Indicate when in worktree. by @sandinmyjoints in #800
  • Pacify Emacs 31 compiler warning by @dr-scsi in #801
  • Propose fix a couple of typos by @jeis4wpi in #805
  • fix: set battery-mode-line-string value when updating battery status by @bormoge in #808
  • Pacify the compiler after last change by @dr-scsi in #809
  • fix: safe set battery-mode-line-string by @zsxh in #810
  • fix: check if battery-mode-line-string battery icon can be displayed by @bormoge in #811
  • Pacify compiler warning by @dr-scsi in #815
  • fix: unset active modeline when child frame is selected by @emil-e in #818
  • feat: filter IRC notifications by tracking-faces-priorities (circe) by @soppelmann in #820
  • Pacify compiler warnings by @dr-scsi in #821
  • Fix docstrings by @dr-scsi in #822
  • fix: Preserve multiple face properties in inactive mode-line text. by @ringawho in #824
  • fix: preserve multiple face properties and avoid modifying cached text. by @ringawho in #825
  • fix: show Elixir version instead of OTP version by @katafrakt in #829
  • fix(vcs): use the codicon set for the worktree indicator by @brianmcgillion in #832
  • update backport from mode-line-right-align-edge in emacs master by @andre0x42 in #837
  • fix: omit separators for undecided EOL styles by @vritser in #841
  • Show indicator when calc-embedded-mode is active by @bradhowes in #842
  • feat: add option to display doom-modeline-tab-bar-format-global by @bormoge in #843
  • New 'minibuffer-depth' segment to show minibuffer-depth value when > 1 by @bradhowes in #844
  • New keycast segment to show key events. by @bradhowes in #845
  • fix: keep eglot icon face in sync with server state (#846) by @seagle0128 in #847
  • perf(flymake): stop rescanning diagnostics on every window change by @seagle0128 in #848
  • perf(check): cache the wrapped check segment between redisplays by @seagle0128 in #849
  • perf(flycheck): stop rescanning diagnostics on every window change by @seagle0128 in #850
  • test: merge the check segment tests into one file by @seagle0128 in #851
  • bench: add a check segment benchmark by @seagle0128 in #852
  • feat(position): show line within current Org Babel source block by @seagle0128 in #853
  • perf(word-count): throttle counting with timeout-throttle by @seagle0128 in #854
  • Handle markers arguments in doom-modeline--selection-stats by @DevJac in #855

New Contributors

Full Changelog: v4.2.1...v4.3.0