Polish UI + clean up core-ui.el

This commit is contained in:
Henrik Lissner 2015-11-10 18:01:57 -05:00
parent 6cef4f9db5
commit 05ab5e0d3f

View file

@ -10,22 +10,11 @@
(set-frame-font narf-default-font) (set-frame-font narf-default-font)
(set-face-attribute 'default t :font narf-default-font) (set-face-attribute 'default t :font narf-default-font)
(setq-default indicate-empty-lines t)
(define-fringe-bitmap 'tilde [0 0 0 113 219 142 0 0] nil nil 'center) (define-fringe-bitmap 'tilde [0 0 0 113 219 142 0 0] nil nil 'center)
(setcdr (assq 'empty-line fringe-indicator-alist) 'tilde) (setcdr (assq 'empty-line fringe-indicator-alist) 'tilde)
(set-fringe-bitmap-face 'tilde 'font-lock-comment-face)) (set-fringe-bitmap-face 'tilde 'font-lock-comment-face))
(menu-bar-mode -1)) (menu-bar-mode -1))
(blink-cursor-mode 1) ; do blink cursor
(tooltip-mode -1) ; show tooltips in echo area
;; Highlight line
(add-hook! (prog-mode puml-mode markdown-mode) 'hl-line-mode)
;; hl-line-mode breaks minibuffer in TTY
;; (add-hook! minibuffer-setup
;; (make-variable-buffer-local 'global-hl-line-mode)
;; (setq global-hl-line-mode nil))
(setq-default (setq-default
blink-matching-paren nil blink-matching-paren nil
show-paren-delay 0.075 show-paren-delay 0.075
@ -37,23 +26,42 @@
highlight-nonselected-windows nil highlight-nonselected-windows nil
uniquify-buffer-name-style nil uniquify-buffer-name-style nil
visible-bell nil ; silence of the bells visible-bell nil ; silence of the bells
use-dialog-box nil ; avoid GUI use-dialog-box nil ; always avoid GUI
redisplay-dont-pause t redisplay-dont-pause t
indicate-buffer-boundaries nil indicate-buffer-boundaries nil
indicate-empty-lines nil indicate-empty-lines t
fringes-outside-margins t ; fringes on the other side of line numbers fringes-outside-margins t
hl-line-sticky-flag nil
jit-lock-defer-time 0 jit-lock-defer-time 0
jit-lock-stealth-time 1 jit-lock-stealth-time 1
resize-mini-windows t) resize-mini-windows t)
;; Hide modeline in help windows (blink-cursor-mode 1) ; do blink cursor
(tooltip-mode -1) ; show tooltips in echo area
;; Highlight line
(add-hook! (prog-mode puml-mode markdown-mode) 'hl-line-mode)
;; Disable line highlight in visual mode
(defvar narf--hl-line-mode nil)
(make-variable-buffer-local 'narf--hl-line-mode)
(defun narf|hl-line-on ()
(when narf--hl-line-mode (hl-line-mode +1)))
(defun narf|hl-line-off ()
(when narf--hl-line-mode (hl-line-mode -1)))
(add-hook! hl-line-mode (if hl-line-mode (setq narf--hl-line-mode t)))
(add-hook! evil-visual-state-entry 'narf|hl-line-off)
(add-hook! evil-visual-state-exit 'narf|hl-line-on)
;; Hide modeline in help windows ;;;;;;;
(add-hook! help-mode (setq-local mode-line-format nil)) (add-hook! help-mode (setq-local mode-line-format nil))
;; Highlight TODO/FIXME/NOTE tags ;; Highlight TODO/FIXME/NOTE tags ;;;;;;
(defface narf-todo-face '((t (:inherit font-lock-warning-face))) "Face for TODOs") (defface narf-todo-face '((t (:inherit font-lock-warning-face))) "Face for TODOs")
(defface narf-fixme-face '((t (:inherit font-lock-warning-face))) "Face for FIXMEs") (defface narf-fixme-face '((t (:inherit font-lock-warning-face))) "Face for FIXMEs")
(defface narf-note-face '((t (:inherit font-lock-warning-face))) "Face for NOTEs") (defface narf-note-face '((t (:inherit font-lock-warning-face))) "Face for NOTEs")
@ -134,7 +142,9 @@
(remove-hook 'post-command-hook 'narf|nlinum-hl-line) (remove-hook 'post-command-hook 'narf|nlinum-hl-line)
(narf|nlinum-unhl-line)) (narf|nlinum-unhl-line))
(add-hook! (markdown-mode prog-mode scss-mode web-mode) 'narf|nlinum-enable) (add-hook!
(markdown-mode prog-mode scss-mode web-mode)
'narf|nlinum-enable)
:config :config
(defun narf|nlinum-unhl-line () (defun narf|nlinum-unhl-line ()
"Highlight line number" "Highlight line number"