More cleanup
This commit is contained in:
parent
057403cee8
commit
91ebf03a59
2 changed files with 244 additions and 257 deletions
|
@ -8,23 +8,23 @@
|
|||
flycheck-check-syntax-automatically '(save mode-enabled)
|
||||
flycheck-disabled-checkers '(emacs-lisp emacs-lisp-checkdoc make))
|
||||
:config
|
||||
(use-package flycheck-package :config (flycheck-package-setup))
|
||||
(require 'flycheck-package)
|
||||
(flycheck-package-setup)
|
||||
|
||||
(use-package flycheck-pos-tip
|
||||
:config
|
||||
(require 'flycheck-pos-tip)
|
||||
(setq flycheck-pos-tip-timeout 10
|
||||
flycheck-display-errors-delay 0.5)
|
||||
(flycheck-pos-tip-mode +1))
|
||||
(flycheck-pos-tip-mode +1)
|
||||
|
||||
(evil-initial-state 'flycheck-error-list-mode 'emacs)
|
||||
(map! (:map flycheck-error-list-mode-map
|
||||
(map! :map flycheck-error-list-mode-map
|
||||
:n [escape] 'kill-this-buffer
|
||||
:n "q" 'kill-this-buffer
|
||||
:n "C-n" 'flycheck-error-list-next-error
|
||||
:n "C-p" 'flycheck-error-list-previous-error
|
||||
:n "j" 'flycheck-error-list-next-error
|
||||
:n "k" 'flycheck-error-list-previous-error
|
||||
:n "RET" 'flycheck-error-list-goto-error))
|
||||
:n "RET" 'flycheck-error-list-goto-error)
|
||||
|
||||
;; And on ESC in normal mode.
|
||||
(advice-add 'evil-force-normal-state :after 'narf*flycheck-buffer)
|
||||
|
|
|
@ -1,23 +1,20 @@
|
|||
;;; core-ui.el --- interface settings
|
||||
|
||||
(setq-default
|
||||
blink-matching-paren nil
|
||||
blink-matching-paren nil ; don't blink matching delimiters--too distracting
|
||||
show-paren-delay 0.075
|
||||
|
||||
;; Multiple cursors across buffers cause a strange redraw delay for
|
||||
;; some things, like auto-complete or evil-mode's cursor color
|
||||
;; switching.
|
||||
cursor-in-non-selected-windows t
|
||||
;;cursor-in-non-selected-windows nil ; no cursors except in active buffer
|
||||
highlight-nonselected-windows nil
|
||||
hl-line-sticky-flag nil ; only highlight in one window
|
||||
|
||||
uniquify-buffer-name-style nil ; my mode-line does this for me
|
||||
visible-bell nil ; silence of the bells
|
||||
use-dialog-box nil ; always avoid GUI
|
||||
redisplay-dont-pause t
|
||||
indicate-buffer-boundaries t
|
||||
indicate-empty-lines t
|
||||
fringes-outside-margins t
|
||||
redisplay-dont-pause t ; don't pause display on input
|
||||
indicate-buffer-boundaries t ; show indicators where buffer starts/ends
|
||||
indicate-empty-lines t ; show indicators on empty lines
|
||||
fringes-outside-margins t ; switches order of fringe and margin
|
||||
idle-update-delay 2 ; update a little less often
|
||||
split-width-threshold nil ; favor horizontal splits
|
||||
show-help-function nil ; hide :help-echo text
|
||||
|
@ -36,29 +33,30 @@
|
|||
(blink-cursor-mode 1) ; blink cursor
|
||||
(tooltip-mode -1) ; show tooltips in echo area
|
||||
|
||||
;; Set up minibuffer and fringe
|
||||
(defface narf-minibuffer-active '((t (:inherit mode-line)))
|
||||
"Face for active minibuffer")
|
||||
|
||||
;; set up minibuffer and fringe
|
||||
(if (not window-system)
|
||||
(menu-bar-mode -1)
|
||||
(scroll-bar-mode -1) ; no scrollbar
|
||||
(tool-bar-mode -1) ; no toolbar
|
||||
|
||||
;; Set fonts
|
||||
;; full filename in frame title
|
||||
(setq frame-title-format '(buffer-file-name "%f" ("%b")))
|
||||
|
||||
;; set fonts
|
||||
(narf/load-font narf-default-font)
|
||||
(set-face-attribute 'default t :font narf-default-font)
|
||||
|
||||
;; Setup fringe
|
||||
;; standardize fringe width
|
||||
(fringe-mode narf-fringe-size)
|
||||
(setq frame-title-format '(buffer-file-name "%f" ("%b")))
|
||||
|
||||
;; Tilde empty-line indicator
|
||||
;; Show tilde in margin on empty lines
|
||||
(define-fringe-bitmap 'tilde [64 168 16] nil nil 'center)
|
||||
(setcdr (assq 'empty-line fringe-indicator-alist) 'tilde)
|
||||
(set-fringe-bitmap-face 'tilde 'font-lock-comment-face)
|
||||
|
||||
;; Brighter minibuffer when active
|
||||
(defface narf-minibuffer-active '((t (:inherit mode-line)))
|
||||
"Face for active minibuffer")
|
||||
(defun narf|minibuffer-setup ()
|
||||
(set-window-fringes (selected-window) 0 0 nil)
|
||||
(make-local-variable 'face-remapping-alist)
|
||||
|
@ -66,7 +64,7 @@
|
|||
(add-hook! minibuffer-setup 'narf|minibuffer-setup)
|
||||
(add-hook! 'after-init-hook (set-window-fringes (minibuffer-window) 0 0 nil)))
|
||||
|
||||
;; Fix display of certain unicode characters
|
||||
;; Try to display unicode characters without upsetting line-hieght (as much as possible)
|
||||
(mapc (lambda (set)
|
||||
(let ((font (car set))
|
||||
(chars (cadr set))
|
||||
|
@ -79,17 +77,17 @@
|
|||
?➊ ?➋ ?➌ ?➍ ?➎ ?❻ ?➐ ?➑ ?➒ ?➓))
|
||||
;; File attachment symbols (for org-mode)
|
||||
("FontAwesome" (? ? ? ? ? ? ? ? ?) 13)
|
||||
;; Math symbols
|
||||
;; Certain math symbols
|
||||
("Hack" (?× ?∙ ?÷ ?⌉ ?⌈ ?⌊ ?⌋
|
||||
?∩ ?∪ ?⊆ ?⊂ ?⊄ ?⊇ ?⊃ ?⊅
|
||||
?⇒ ?⇐ ?⇔ ?↔ ?→ ?≡ ?∴ ?∵ ?⊕ ?∀ ?∃ ?∄ ?∈ ?∉
|
||||
?∨ ?∧ ?¬))))
|
||||
|
||||
;; on by default in Emacs 25
|
||||
;; on by default in Emacs 25; I prefer to enable on a mode-by-mode basis, so disable it
|
||||
(when (and (featurep 'eldoc) (>= emacs-major-version 25))
|
||||
(global-eldoc-mode -1))
|
||||
|
||||
;; Highlight line
|
||||
;; line highlighting
|
||||
(add-hook! (prog-mode markdown-mode) 'hl-line-mode)
|
||||
|
||||
;; Disable line highlight in visual mode
|
||||
|
@ -213,13 +211,13 @@
|
|||
:config
|
||||
(setq-default
|
||||
powerline-default-separator nil
|
||||
powerline-height 19
|
||||
powerline-height 18
|
||||
spaceline-highlight-face-func 'spaceline-highlight-face-evil-state)
|
||||
|
||||
(defface mode-line-is-modified nil "Face for mode-line modified symbol")
|
||||
(defface mode-line-buffer-file nil "Face for mode-line buffer file path")
|
||||
|
||||
(progn ;; Custom modeline segments
|
||||
;; Custom modeline segments
|
||||
(spaceline-define-segment *buffer-path
|
||||
(if buffer-file-name
|
||||
(let* ((project-path (let (projectile-require-project-root) (projectile-project-root)))
|
||||
|
@ -274,18 +272,7 @@
|
|||
(powerline-raw
|
||||
(concat (replace-regexp-in-string
|
||||
(format "^ %s" (vc-backend buffer-file-name))
|
||||
"" vc-mode)
|
||||
(when buffer-file-name
|
||||
(pcase (vc-state (buffer-file-name))
|
||||
(`up-to-date "")
|
||||
(`edited "*")
|
||||
(`added "+")
|
||||
(`unregistered "?")
|
||||
(`removed "-")
|
||||
(`needs-merge "%")
|
||||
(`needs-update "^")
|
||||
(`ignored "#")
|
||||
(_ "_")))))
|
||||
"" vc-mode)))
|
||||
:when (and active vc-mode)
|
||||
:face other-face
|
||||
:tight-right t)
|
||||
|
@ -300,7 +287,7 @@ See `define-env-command!' to define one for a mode."
|
|||
:tight-right t)
|
||||
|
||||
|
||||
(progn ;; search indicators
|
||||
;; search indicators
|
||||
(defface mode-line-count-face nil "")
|
||||
(make-variable-buffer-local 'anzu--state)
|
||||
(spaceline-define-segment *anzu
|
||||
|
@ -351,7 +338,7 @@ anzu to be enabled."
|
|||
:when (and (evil-ex-p) (evil-ex-hl-active-p 'evil-ex-substitute))
|
||||
:tight t
|
||||
:face (if active 'mode-line-count-face 'mode-line-inactive)
|
||||
:skip-alternate t))
|
||||
:skip-alternate t)
|
||||
|
||||
(spaceline-define-segment *macro-recording
|
||||
"Show when recording macro"
|
||||
|
@ -405,7 +392,7 @@ Supports both Emacs and Evil cursor conventions."
|
|||
:face highlight-face
|
||||
:skip-alternate t)
|
||||
|
||||
(progn ;; flycheck
|
||||
;; flycheck
|
||||
(defun narf--flycheck-count (state)
|
||||
"Return flycheck information for the given error type STATE."
|
||||
(let* ((counts (flycheck-count-errors flycheck-current-errors))
|
||||
|
@ -444,12 +431,12 @@ Supports both Emacs and Evil cursor conventions."
|
|||
(or flycheck-current-errors
|
||||
(eq 'running flycheck-last-status-change)))
|
||||
:tight t
|
||||
:skip-alternate t))
|
||||
:skip-alternate t)
|
||||
|
||||
(spaceline-define-segment *hud
|
||||
"A HUD that shows which part of the buffer is currently visible."
|
||||
(powerline-hud (if active 'spaceline-highlight-face 'region) line-face 1)
|
||||
:tight-right t))
|
||||
:tight-right t)
|
||||
|
||||
;; Initialize modeline
|
||||
(spaceline-install
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue