Doom Modeline does not respect doom-modeline-height

What happened?

When flycheck-mode is enabled the mode-line is a certain height:

tall

However, if flycheck-mode is disabled, the mode-line becomes shorter:

short

In attempt to remedy this issue, I have added the following to my config, but it appears to make no difference.

(setq doom-modeline-height 40)

What did you expect to happen?

The modeline should remain at a constant height. Additionally, setting doom-modeline-height should change the height of the modeline.

Steps to reproduce

  1. Enable doom-modeline and flycheck-mode.
  2. Disable flycheck-mode by M-x flycheck-mode.

System information


Loading data dump...

I’m afraid this is not a bug—at least, not an issue Doom or doom-modeline has any power over, so I’ve moved this to #support:upstream.

Emacs shrinks the mode-line to the height of the shortest character displayed in it. Normally, this is the height of your default font, but icons and bitmaps can be any arbitrary height. The doom-modeline package (which I don’t maintain, btw) uses a dynamically sized bitmap to enforce a minimum size, but only beyond the height of your default font.

Turning on flycheck-mode turns on the flycheck segment of the mode-line, where it displays an icon next to the issue count.

Here are two options to work around this:

  • Turn off icons in the mode-line altogether with:

    ;;; add to $DOOMDIR/config.el
    (setq doom-modeline-icon nil)
    
  • Tweak all-the-icons-scale-factor (1.2 by default) to resize all icons used in the mode-line (and elsewhere):

    ;;; add to $DOOMDIR/config.el
    (setq all-the-icons-scale-factor 1.1)
    

Alternatively, you could modify doom-modeline’s flycheck segment or advise doom-modeline-update-flycheck-icon to use an icon that isn’t so tall.

In any case, you may have better luck reporting this directly to doom-modeline instead.

2 Likes

Thank you for your assistance.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.