doomemacs / doomemacs

An Emacs framework for the stubborn martian hacker
MIT License
19.46k stars 3.06k forks source link

[BUG] Two error indicators appear in the modeline #2272

Closed r-darwish closed 4 years ago

r-darwish commented 4 years ago

What did you expect to happen? A single checker indicator should appear for errors and warnings

What actually happened? Two indicators appear

Additional details: image

Personal configuration.

I wasn't sure if this is a doom issue or doom-modeline issue. I used doom-modeline outside of Doom Emacs and never encountered the left indicator. The left indicator isn't clickable so I couldn't figure out its source.

Steps to reproduce: Just make a flychecker checker display errors.

System information:

``` emacs version 26.3 features NOTIFY ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS MODULES THREADS LCMS2 build Dec 03, 2019 buildopts (--with-mac --enable-mac-app=/Users/travis/build/railwaycat/homebrew-emacsmacport/build-scripts/emacs-source/tmproot --prefix=/Users/travis/build/railwaycat/homebrew-emacsmacport/build-scripts/emacs-source/tmproot --enable-mac-self-contained --with-modules) windowsys mac daemonp server-running doom version 2.0.9 build HEAD -> develop, origin/develop, origin/HEAD db9bc763e 2019-12-29 19:24:55 -0500 dir ~/.doom.d/ system type darwin config x86_64-apple-darwin18.5.0 shell /usr/local/bin/fish uname Darwin 19.2.0 Darwin Kernel Version 19.2.0: Sat Nov 9 03:47:04 PST 2019; root:xnu-6153.61.1~20/RELEASE_X86_64 x86_64 path (~/.venvs/deploy/bin /usr/local/opt/python/libexec/bin ~/.poetry/bin ~/.gem/ruby/2.6.0/bin ~/.cargo/bin /usr/local/bin /usr/bin /bin /usr/sbin /sbin /Applications/Emacs.app/Contents/MacOS/libexec /Applications/Emacs.app/Contents/MacOS/bin) config envfile nil elc-files 0 modules (:completion company (ivy +childframe +icons) :ui doom doom-dashboard hl-todo hydra modeline nav-flash ophints (popup +all +defaults) vc-gutter vi-tilde-fringe window-select :editor file-templates fold (format +onsave) lispy multiple-cursors rotate-text snippets :emacs dired electric ibuffer vc :tools (eval +overlay) flycheck (lookup +docsets) lsp macos magit :lang data emacs-lisp (java +lsp) javascript markdown (org +dragndrop +present) python rust sh web :config (default +bindings)) packages (highlight-symbol git-link syntax-subword) elpa (n/a) ```
hlissner commented 4 years ago

It appears to be lsp-rust that is adding a new segment to the mode-line, to global-mode-string, to be precise. There is no setting to prevent this, so we'd have to do it manually. Try this:

(after! lsp-rust
  (delete (list '(t lsp-clients-rust-progress-string)) global-mode-string))
r-darwish commented 4 years ago

It seems that some recent update caused it to vanish

hlissner commented 4 years ago

As of https://github.com/brotzeit/rustic/commit/4f45248f464ee2bcad9c8179b867cbb3eea44ce8 the mode-line modification was moved.