2017-02-03 19:44:14 -05:00
|
|
|
;;; ui/doom/config.el
|
2017-01-17 00:20:59 -05:00
|
|
|
|
|
|
|
(defvar +doom-theme 'doom-one
|
|
|
|
"The color theme currently in use.")
|
|
|
|
|
2017-01-31 05:09:20 -05:00
|
|
|
(defvar +doom-font
|
|
|
|
(font-spec :family "Fira Mono" :size 12)
|
|
|
|
"The font currently in use.")
|
2017-01-17 00:20:59 -05:00
|
|
|
|
2017-01-31 05:09:20 -05:00
|
|
|
(defvar +doom-variable-pitch-font
|
|
|
|
(font-spec :family "Fira Sans" :size 12)
|
|
|
|
"The font currently in use.")
|
2017-01-17 00:20:59 -05:00
|
|
|
|
2017-01-31 05:09:20 -05:00
|
|
|
(defvar +doom-unicode-font
|
|
|
|
(font-spec :family "DejaVu Sans Mono" :size 12)
|
|
|
|
"Fallback font for unicode glyphs.")
|
2017-01-17 00:20:59 -05:00
|
|
|
|
2017-02-03 19:44:14 -05:00
|
|
|
|
2017-01-31 05:09:20 -05:00
|
|
|
;;; Set fonts
|
|
|
|
(when (display-graphic-p)
|
|
|
|
(with-demoted-errors "FONT ERROR: %s"
|
|
|
|
(set-frame-font +doom-font t t)
|
|
|
|
;; Fallback to `doom-unicode-font' for Unicode characters
|
|
|
|
(when +doom-unicode-font
|
|
|
|
(set-fontset-font t 'unicode +doom-unicode-font))
|
|
|
|
;; ...and for variable-pitch mode
|
|
|
|
(when +doom-variable-pitch-font
|
|
|
|
(set-face-attribute 'variable-pitch nil :font +doom-variable-pitch-font))))
|
|
|
|
|
|
|
|
|
|
|
|
;;; More reliable inter-window border
|
2017-02-03 19:44:14 -05:00
|
|
|
;; The native border "consumes" a pixel of the fringe on righter-most splits,
|
|
|
|
;; `window-divider' does not. Available since Emacs 25.1.
|
2017-01-31 05:09:20 -05:00
|
|
|
(setq window-divider-default-places t
|
|
|
|
window-divider-default-bottom-width 0
|
|
|
|
window-divider-default-right-width 1)
|
|
|
|
(window-divider-mode +1)
|
|
|
|
|
|
|
|
|
2017-02-03 19:44:14 -05:00
|
|
|
;; Causes a flash around the cursor when it moves across a "large" distance.
|
|
|
|
;; Usually between windows, or across files. This makes it easier to keep track
|
|
|
|
;; where your cursor is, which I find helpful on my 30" 2560x1600 display.
|
|
|
|
(use-package! beacon :demand t
|
|
|
|
:config
|
|
|
|
(beacon-mode +1)
|
|
|
|
(setq beacon-color (let ((bg (face-attribute 'highlight :background nil t)))
|
|
|
|
(if (eq bg 'unspecified)
|
|
|
|
(face-attribute 'highlight :foreground nil t)
|
|
|
|
bg))
|
|
|
|
beacon-blink-when-buffer-changes t
|
|
|
|
beacon-blink-when-point-moves-vertically 10))
|
|
|
|
|
|
|
|
|
2017-01-31 05:09:20 -05:00
|
|
|
;; Apply the doom-one theme from `doom-themes' for full compatibility; gives
|
|
|
|
;; Emacs a look inspired by Dark One in Atom.
|
|
|
|
;; <https://github.com/hlissner/emacs-doom-theme>
|
2017-02-03 19:44:14 -05:00
|
|
|
(use-package! doom-themes :demand t
|
|
|
|
:load-path "~/work/plugins/emacs-doom-theme"
|
|
|
|
:config
|
2017-01-17 00:20:59 -05:00
|
|
|
(load-theme +doom-theme t)
|
|
|
|
|
|
|
|
;; brighter source buffers
|
|
|
|
(add-hook 'find-file-hook 'doom-buffer-mode)
|
|
|
|
|
2017-01-31 05:09:20 -05:00
|
|
|
;; Add file icons to doom-neotree
|
2017-01-17 00:20:59 -05:00
|
|
|
(require 'doom-neotree)
|
2017-01-31 05:09:20 -05:00
|
|
|
(setq doom-neotree-enable-variable-pitch t
|
|
|
|
doom-neotree-file-icons 'simple
|
|
|
|
doom-neotree-line-spacing 3)
|
|
|
|
|
|
|
|
;; Add line-highlighting to nlinum
|
2017-01-17 00:20:59 -05:00
|
|
|
(require 'doom-nlinum))
|
2017-01-31 05:09:20 -05:00
|
|
|
|
|
|
|
|
2017-02-03 19:44:14 -05:00
|
|
|
;; Nicer folded overlays that stand out a bit more
|
|
|
|
(after! hideshow
|
|
|
|
(defface doom-folded-face '((t (:foreground "#555" :background "#888")))
|
2017-01-31 05:09:20 -05:00
|
|
|
"Face to hightlight `hideshow' overlays."
|
|
|
|
:group 'hideshow)
|
|
|
|
(setq hs-set-up-overlay
|
|
|
|
(lambda (ov)
|
|
|
|
(when (eq 'code (overlay-get ov 'hs))
|
|
|
|
(overlay-put
|
|
|
|
ov 'display (propertize " [...] " 'face 'doom-folded-face))))))
|
|
|
|
|
|
|
|
|
|
|
|
;; Show diffs with subtle lines in the fringe
|
|
|
|
(after! git-gutter-fringe
|
|
|
|
;; places the git gutter outside the margins.
|
|
|
|
(setq-default fringes-outside-margins t)
|
|
|
|
;; thin fringe bitmaps
|
|
|
|
(define-fringe-bitmap 'git-gutter-fr:added
|
|
|
|
[224 224 224 224 224 224 224 224 224 224 224 224 224 224 224 224 224 224 224 224 224 224 224 224 224]
|
|
|
|
nil nil 'center)
|
|
|
|
(define-fringe-bitmap 'git-gutter-fr:modified
|
|
|
|
[224 224 224 224 224 224 224 224 224 224 224 224 224 224 224 224 224 224 224 224 224 224 224 224 224]
|
|
|
|
nil nil 'center)
|
|
|
|
(define-fringe-bitmap 'git-gutter-fr:deleted
|
|
|
|
[0 0 0 0 0 0 0 0 0 0 0 0 0 128 192 224 240 248]
|
|
|
|
nil nil 'center))
|