emacsorphanage/git-gutter

Git-Gutter sign doesn't work properly

VisionaryAppDev opened this issue · 2 comments

I am trying to use git-gutter, then the icon was not shown as expected compare to the screenshot sample in the main github page. The icon or sign was too small and ugly so I decide to try git-gutter+ and git-gutter+ work well.

Just need help if I've done something wrong or way to fix this problem.

I am using GNU Emacs 26.1 and below is my configuration and the screenshot of the icon that was shown.

(require 'git-gutter)

;; If you enable global minor mode
(global-git-gutter-mode t)

(custom-set-variables
'(git-gutter:update-interval 2))

(custom-set-variables
'(git-gutter:window-width 2)
'(git-gutter:modified-sign "☁")
'(git-gutter:added-sign "☀1")
'(git-gutter:deleted-sign "☂"))

(add-to-list 'git-gutter:update-hooks 'focus-in-hook)
(add-to-list 'git-gutter:update-commands 'other-window)
`

1
2

What's unusual about your setup is that you're calling custom-set-variables which is an expression generated by the customization system within Emacs, but not something you would edit.

Instead, you want to use customize-set-variable like this:
(customize-set-variable 'git-gutter:update-interval 2)
(customize-set-variable 'git-gutter:window-width 2)
(customize-set-variable 'git-gutter:modified-sign "☁")
(customize-set-variable 'git-gutter:added-sign "☀1")
(customize-set-variable 'git-gutter:deleted-sign "☂")

See if that changes things for you?

I have confirmed this works as I would expect, with a few notes:

  1. the appearance of those glyphs will depend on how they're drawn in the font you use
  2. some themes may override the face definitions further, e.g. the zenburn theme happens to redefine the git-gutter:___ faces as inverse video.
  3. please see my note about using customize-set-variable in your configuration file