Update ui modules for v2

This commit is contained in:
Henrik Lissner 2017-02-03 19:44:14 -05:00
parent d4b0216154
commit a2a0ab4ed7
5 changed files with 75 additions and 57 deletions

View file

@ -1,4 +1,4 @@
;;; autoload.el
;;; ui/doom/autoload.el
;;;###autoload (autoload '+doom:scratch-buffer "ui/doom/autoload" nil t)
(evil-define-operator +doom:scratch-buffer (&optional beg end bang)

View file

@ -1,4 +1,4 @@
;;;
;;; ui/doom/config.el
(defvar +doom-theme 'doom-one
"The color theme currently in use.")
@ -15,6 +15,7 @@
(font-spec :family "DejaVu Sans Mono" :size 12)
"Fallback font for unicode glyphs.")
;;; Set fonts
(when (display-graphic-p)
(with-demoted-errors "FONT ERROR: %s"
@ -27,28 +28,35 @@
(set-face-attribute 'variable-pitch nil :font +doom-variable-pitch-font))))
;;; TODO/FIXME/NOTE highlighting in comments
(add-hook! (prog-mode emacs-lisp-mode css-mode)
(font-lock-add-keywords
nil '(("\\<\\(TODO\\(?:(.*)\\)?:?\\)\\>" 1 'warning prepend)
("\\<\\(FIXME\\(?:(.*)\\)?:?\\)\\>" 1 'error prepend)
("\\<\\(NOTE\\(?:(.*)\\)?:?\\)\\>" 1 'success prepend))))
;;; More reliable inter-window border
;; The native border "consumes" a pixel of the fringe on righter-most splits (in
;; Yamamoto's emacs-mac at least), `window-divider' does not. Available since
;; Emacs 25.1.
;; The native border "consumes" a pixel of the fringe on righter-most splits,
;; `window-divider' does not. Available since Emacs 25.1.
(setq window-divider-default-places t
window-divider-default-bottom-width 0
window-divider-default-right-width 1)
(window-divider-mode +1)
;; 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))
;; 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>
(after! doom-themes
(use-package! doom-themes :demand t
:load-path "~/work/plugins/emacs-doom-theme"
:config
(load-theme +doom-theme t)
;; brighter source buffers
@ -64,25 +72,11 @@
(require 'doom-nlinum))
;; 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.
(after! beacon
(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))
;; Make code folding overlays look a little nicer
(after! hideshow ; built-in
(defface doom-folded-face '((t (:background "#888")))
;; Nicer folded overlays that stand out a bit more
(after! hideshow
(defface doom-folded-face '((t (:foreground "#555" :background "#888")))
"Face to hightlight `hideshow' overlays."
:group 'hideshow)
(setq hs-set-up-overlay
(lambda (ov)
(when (eq 'code (overlay-get ov 'hs))
@ -94,7 +88,6 @@
(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]

View file

@ -1,9 +1,6 @@
;; -*- no-byte-compile: t; -*-
;;; ui/doom/packages.el
(package! beacon :demand t)
(package! beacon)
(package! doom-themes)
(package! doom-themes
:ensure nil
:demand t
:load-path "~/work/plugins/emacs-doom-theme")