I just install Emacs with magit & git-gutter. Initialise a git repo then create and manipulate some files but I cannot see any sign. I hit
magit-status Then stage and commit and make some changes (add, modify and delete lines) then save but nothing happen.
My init.el:
(use-package magit
:ensure t)
(use-package git-gutter
:ensure t)
(require 'git-gutter)
;; If you enable global minor mode
(global-git-gutter-mode t)
;; If you would like to use git-gutter.el and linum-mode
(git-gutter:linum-setup)
(custom-set-variables
'(git-gutter:update-interval 2))
(custom-set-variables
'(git-gutter:modified-sign "=") ;; two space
'(git-gutter:added-sign "+") ;; multiple character is OK
'(git-gutter:deleted-sign "-"))
(set-face-background 'git-gutter:modified "#0174fc") ;; background color
(set-face-foreground 'git-gutter:added "#64a888")
(set-face-foreground 'git-gutter:deleted "#c5332c")
I dont have any other packages installed.
Emacs 27.1 (build1, x86_64_pc-linux-gnu) GTK+ Version 3.24.30, cairo version 1.16.0)
require
is unnecessary as you have already calleduse-package
for it, but that won’t prevent it from working either. Calling(global-git-gutter-mode t)
was all I needed to do to get it working, but then I don’t uselinum-mode
. Perhaps they don’t work together properly? The webpage says that this is experimental, so perhaps try without it.