Skip to content

Instantly share code, notes, and snippets.

@arronmabrey
Last active May 10, 2019 07:51

Revisions

  1. arronmabrey renamed this gist Jul 22, 2016. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  2. arronmabrey created this gist Jul 22, 2016.
    44 changes: 44 additions & 0 deletions *scratch*.el
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,44 @@
    (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 "!"
    ))
    )