|
|
|
@@ -562,15 +562,64 @@ Turns out that someone wrote this exact thing already. Yay get to drop my own cr |
|
|
|
) |
|
|
|
#+END_SRC |
|
|
|
|
|
|
|
*** spaceline theme |
|
|
|
*** mode-line setup |
|
|
|
|
|
|
|
Just use the silly spacemacs smart modeline theme cause I'm lazy. |
|
|
|
Using some hacked together minimal mode line stuff now, spaceline too too much |
|
|
|
oomph with all the crap it did. |
|
|
|
|
|
|
|
#+BEGIN_SRC emacs-lisp :tangle no |
|
|
|
(use-package spaceline :ensure t :init (progn (require 'spaceline-config) (spaceline-spacemacs-theme))) |
|
|
|
#+BEGIN_SRC emacs-lisp |
|
|
|
(defun my-flycheck-lighter (state) |
|
|
|
"formats the mode-line fycheck error/warning/note junk" |
|
|
|
(let* ((counts (flycheck-count-errors flycheck-current-errors)) |
|
|
|
(errorp (flycheck-has-current-errors-p state)) |
|
|
|
(err (or (cdr (assq state counts)) "?")) |
|
|
|
(running (eq 'running flycheck-last-status-change))) |
|
|
|
(if (or errorp running) (format "•%s" err)))) |
|
|
|
|
|
|
|
(use-package quelpa-use-package :ensure t) |
|
|
|
|
|
|
|
(use-package mini-modeline |
|
|
|
:ensure t |
|
|
|
:after quelpa-use-package |
|
|
|
:diminish |
|
|
|
:quelpa (mini-modeline :repo "kiennq/emacs-mini-modeline" :fetcher github) |
|
|
|
:config |
|
|
|
(mini-modeline-mode) |
|
|
|
:custom |
|
|
|
(mini-modeline-face-attr '(:background "white" :weight normal :box (:line-width 2 :color "#ffffff"))) |
|
|
|
(mini-modeline-display-gui-line nil) |
|
|
|
(mini-modeline-r-format '((:eval |
|
|
|
(when (and (bound-and-true-p flycheck-mode) |
|
|
|
(or flycheck-current-errors |
|
|
|
(eq 'running flycheck-last-status-change))) |
|
|
|
(concat |
|
|
|
" " |
|
|
|
(cl-loop for state in '((error . "#FB4933") |
|
|
|
(warning . "#FABD2F") |
|
|
|
(info . "#83A598")) |
|
|
|
as lighter = (my-flycheck-lighter (car state)) |
|
|
|
when lighter |
|
|
|
concat (propertize |
|
|
|
lighter |
|
|
|
'face `(:foreground ,(cdr state)))) |
|
|
|
))) |
|
|
|
"%e %b %c" |
|
|
|
(:eval (if (use-region-p) |
|
|
|
(if (eq (point) (region-beginning)) |
|
|
|
(format "%%l … %d" (line-number-at-pos (region-end))) |
|
|
|
(format "%d … %%l" (line-number-at-pos (region-beginning)))) |
|
|
|
":%l")) |
|
|
|
(:eval |
|
|
|
;; TODO: on click `set-buffer-file-coding-system' |
|
|
|
(if (not (member buffer-file-coding-system |
|
|
|
'(utf-8 utf-8-unix))) |
|
|
|
(symbol-name buffer-file-coding-system)) |
|
|
|
mode-line-misc-info))) |
|
|
|
) |
|
|
|
#+END_SRC |
|
|
|
|
|
|
|
*** yasnippet |
|
|
|
|
|
|
|
#+BEGIN_SRC emacs-lisp |
|
|
|
(use-package yasnippet |
|
|
|
:diminish yas-minor-mode |
|
|
|
|