Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Config git-gutter with linum in Spacemacs
(defun dotspacemacs/layers ()
(setq-default
dotspacemacs-configuration-layers
'((version-control :variables
version-control-global-margin t
version-control-diff-tool 'git-gutter
))))
(defun dotspacemacs/init ()
(setq-default
;; Enable global line-numbers
dotspacemacs-line-numbers 'relative
))
(defun dotspacemacs/user-config ()
(progn
;; Linum
;; NOTE: the "relative" flag for "dotspacemacs-line-numbers 'relative"
;; doesn't seem to be working, so we add the hooks here manually
(when (eq dotspacemacs-line-numbers 'relative)
(add-hook 'prog-mode-hook 'linum-relative-mode)
(add-hook 'text-mode-hook 'linum-relative-mode))
(setq-default
linum-format "%4d \u2502"
linum-relative-format "%4s \u2502"
))
(progn
;; Git Gutter
(set-face-attribute
'git-gutter:added nil :background nil :foreground "green")
(set-face-attribute
'git-gutter:deleted nil :background nil :foreground "red")
(set-face-attribute
'git-gutter:modified nil :background nil :foreground "blue")
(setq-default
git-gutter:modified-sign "!"
))
)
@arronmabrey

This comment has been minimized.

Copy link
Owner Author

commented Jul 22, 2016

@roman

This comment has been minimized.

Copy link

commented May 18, 2018

What is the face you use to have the current line with a grayed-out yellow? I like it, thanks for this btw, it worked like a charm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.