Last active
May 10, 2019 07:51
Config git-gutter with linum in Spacemacs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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 "!" | |
)) | |
) |
Author
arronmabrey
commented
Jul 22, 2016
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