Doom-emacs: git-gutter disabled and without bitmaps

Created on 23 Feb 2020  路  11Comments  路  Source: hlissner/doom-emacs

After some dome upgrades, I don't know if was some recent change but I realized that my git-gutter is not enabled by default anymore. Even so, after enabling manually with (global-git-gutter-mode) on config.el, it shows the default git-gutter UI and not the old one with bitmaps.

What did you expect to happen?
1 - Use git-gutter by default on startup.
2 - Use the bitmaps on the diff.
image

What actually happened?
image

Additional details:

  • My config.el
  • My init.el
  • Already tried doom sync even installing doom-emacs again(I was afraid that some cache was causing this)
  • Already checked if vc-gutter module is enabled.

System information:

emacs   version    26.3
        features   XPM JPEG TIFF GIF PNG RSVG SOUND DBUS GSETTINGS GLIB NOTIFY LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS LIBSYSTEMD
        build      Feb 23, 2020
        buildopts  (--prefix=/nix/store/zxgkx8is4j5a72x0sfh9y5z9hklac995-emacs-26.3 --disable-build-details --with-modules --with-x-toolkit=gtk3 --with-xft CFLAGS=-DMAC_OS_X_VERSION_MAX_ALLOWED=101200)
        windowsys  x
        daemonp    server-running
doom    version    2.0.9
        build      HEAD -> develop, origin/develop, origin/HEAD 23d6ec70d 2020-02-22 13:11:07 -0500
        dir        ~/.dotfiles/emacs/.doom.d/
system  type       gnu/linux
        config     x86_64-pc-linux-gnu
        shell      /run/current-system/sw/bin/zsh
        uname      Linux 5.4.17 #1-NixOS SMP Sat Feb 1 09:34:53 UTC 2020 x86_64
        path       (/run/wrappers/bin ~/.nix-profile/bin /etc/profiles/per-user/greg/bin /nix/var/nix/profiles/default/bin /run/current-system/sw/bin ~/flutter/bin ~/.emacs.d/bin ~/.emacs.d/bin ~/flutter/bin /nix/store/zxgkx8is4j5a72x0sfh9y5z9hklac995-emacs-26.3/libexec/emacs/26.3/x86_64-pc-linux-gnu/)
config  envfile    envvar-file
        elc-files  0
        modules    (:checkers syntax :completion company ivy :ui doom doom-dashboard hl-todo modeline nav-flash ophints (popup +all +defaults) treemacs unicode vc-gutter vi-tilde-fringe window-select workspaces :editor (evil +everywhere) file-templates fold multiple-cursors rotate-text snippets :emacs dired electric vc :tools docker eval (lookup +docsets) lsp magit :lang clojure data emacs-lisp go javascript markdown nix (org +dragndrop +ipython +pandoc +present) python ruby sh web :config (default +bindings +smartparens))
        packages   ((async) (cider) (clj-refactor) (clojure-mode) (company) (company-box :recipe (:host github :repo yyoncho/company-box :branch size)) (company-lsp) (dart-mode) (dart-server) (flutter :recipe (:host github :repo ericdallo/flutter.el :branch test-command)) (flycheck-clojure) (flycheck-clj-kondo :disable t) (ghub) (lsp-java) (lsp-mode) (lsp-ui) (lsp-treemacs) (nyan-mode) (scss-mode) (paredit) (parrot :recipe (:host github :repo jnc-nj/parrot :branch master)))
        elpa       (git-gutter-fringe git-gutter fringe-helper diff-hl)
        unpin      (n/a)

:ui vc-gutter invalid elisp

All 11 comments

It is likely caused by this line in your config.el:

(global-git-gutter-mode)

This loads to little of git-gutter and too early. The :ui vc-gutter module already takes care of setting up git-gutter for you. Remove this line and your issue should go away.

Side notes about your config

Thank you very much for the suggestions @hlissner!

I just added the (global-git-gutter-mode) because without that git-gutter even works :/
So I removed and it looks like git-gutter major mode is not being enabled on startup.

without (global-git-gutter-mode)
image

with (global-git-gutter-mode)
image

It's like the vc-gutter module is not being loaded

Perhaps an error occurs at startup, before Doom can initialize the :ui vc-gutter module? Are there any warnings or error messages in *Messages* (SPC h e or C-h e to open it).

Another possibility: you're using GUI Emacs, right? The fringe bitmaps don't work in terminal Emacs.

No warnings or errors:
image

Yes, I'm using GUI Emacs

Can you reproduce this behavior in the sandbox? e.g.

  1. SPC h E to open the sandbox buffer
  2. Press C-c C-p to start a new instance of Doom without your private config loaded
  3. Open a version controlled file

Oh, you may want to run doom purge on the command line as well, to delete the duplicate git-gutter packages you have installed via ELPA.

I ran doom purge then doom sync(I don't know if this is required after purge) and yet does not works. But on sandbox following your steps it works!
Maybe something on my config.el/init.el?

My dotfiles is updated with my current config.

I'm having this issue on 2 different computers with this same .doom.d, so I think is some wrong config in my .doom.d, right?

I'm not sure why exactly, but this line seems responsible:

 vc-handled-backends nil

This stops git-gutter from auto-starting for me. Does removing it fix it?

Uow, you are totally right, I don't even remember why I added this config :man_facepalming:
Sorry for your time, and thank you for your help and this awesome project!

Was this page helpful?
0 / 5 - 0 ratings