spacemacs-buffer: Added optional feature to show file icons (#15332)

Co-authored-by: Lucius Hu <lebensterben@users.noreply.github.com>
This commit is contained in:
Lucius Hu 2022-02-15 01:52:00 -05:00 committed by GitHub
parent f2afab0c32
commit b7e1dee13f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 291 additions and 258 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 552 B

View File

@ -216,6 +216,12 @@ Spacemacs buffer."
'boolean 'boolean
'spacemacs-dotspacemacs-init) 'spacemacs-dotspacemacs-init)
(spacemacs|defc dotspacemacs-startup-buffer-show-icons t
"If true, show file icons for entries and headings on spacmeacs buffer.
This has no effect in terminal or if \"all-the-icons\" is not installed."
'boolean
'spacemacs-dotspacemacs-init)
(spacemacs|defc dotspacemacs-scratch-mode 'text-mode (spacemacs|defc dotspacemacs-scratch-mode 'text-mode
"Default major mode of the scratch buffer." "Default major mode of the scratch buffer."
'symbol 'symbol

View File

@ -60,10 +60,6 @@
(concat spacemacs-banner-directory "img/spacemacs-badge.png") (concat spacemacs-banner-directory "img/spacemacs-badge.png")
"Spacemacs official badge image.") "Spacemacs official badge image.")
(defconst spacemacs-purple-heart-png
(concat spacemacs-banner-directory "img/heart.png")
"Purple heart emoji.")
(defconst spacemacs-gplv3-official-png (defconst spacemacs-gplv3-official-png
(concat spacemacs-banner-directory "img/gplv3.png") (concat spacemacs-banner-directory "img/gplv3.png")
"GPLv3 official badge image.") "GPLv3 official badge image.")

View File

@ -74,6 +74,30 @@ Internal use, do not set this variable.")
(defvar spacemacs-buffer-mode-map (make-sparse-keymap) (defvar spacemacs-buffer-mode-map (make-sparse-keymap)
"Keymap for spacemacs buffer mode.") "Keymap for spacemacs buffer mode.")
(defvar spacemacs-buffer--random-banner nil
"The random banner chosen.")
(defvar spacemacs-buffer-note-preview-lines 5
"If it's a positive integer, show the notes first number of lines.
If nil, show the full note.")
(defvar spacemacs-buffer--note-preview-nr-of-removed-lines nil
"Store the number of removed lines from the notes:
Quick Help and Release Notes.")
(defvar spacemacs-buffer--errors nil
"List of errors during startup.")
(defvar spacemacs-buffer--idle-numbers-timer nil
"This stores the idle numbers timer.")
(defvar spacemacs-buffer--startup-list-number nil
"This accumulates the numbers that are typed in the home buffer.
It's cleared when the idle timer runs.")
(defvar spacemacs-buffer--last-width nil
"Previous width of spacemacs-buffer.")
(defun spacemacs-buffer/key-bindings () (defun spacemacs-buffer/key-bindings ()
(let ((map spacemacs-buffer-mode-map)) (let ((map spacemacs-buffer-mode-map))
(when dotspacemacs-show-startup-list-numbers (when dotspacemacs-show-startup-list-numbers
@ -129,8 +153,8 @@ FILE: the path to the file containing the banner."
(let ((banner-width 0)) (let ((banner-width 0))
(while (not (eobp)) (while (not (eobp))
(let ((line-length (- (line-end-position) (line-beginning-position)))) (let ((line-length (- (line-end-position) (line-beginning-position))))
(if (< banner-width line-length) (when (< banner-width line-length)
(setq banner-width line-length))) (setq banner-width line-length)))
(forward-line 1)) (forward-line 1))
(goto-char 0) (goto-char 0)
(let ((margin (max 0 (floor (/ (- spacemacs-buffer--window-width (let ((margin (max 0 (floor (/ (- spacemacs-buffer--window-width
@ -152,14 +176,13 @@ Cate special text banner can de reachable via `998', `cat' or `random*'.
`random' ignore special banners whereas `random*' does not." `random' ignore special banners whereas `random*' does not."
(let ((banner (spacemacs-buffer//choose-banner)) (let ((banner (spacemacs-buffer//choose-banner))
(buffer-read-only nil)) (buffer-read-only nil))
(progn (when banner
(when banner (spacemacs-buffer/message (format "Banner: %s" banner))
(spacemacs-buffer/message (format "Banner: %s" banner)) (if (image-type-available-p (intern (file-name-extension banner)))
(if (image-type-available-p (intern (file-name-extension banner))) (spacemacs-buffer//insert-image-banner banner)
(spacemacs-buffer//insert-image-banner banner) (spacemacs-buffer//insert-ascii-banner-centered banner)))
(spacemacs-buffer//insert-ascii-banner-centered banner))) (spacemacs-buffer//insert-buttons)
(spacemacs-buffer//insert-buttons) (spacemacs//redisplay)))
(spacemacs//redisplay))))
(defun spacemacs-buffer/display-startup-note () (defun spacemacs-buffer/display-startup-note ()
"Decide of the startup note and display it if relevant." "Decide of the startup note and display it if relevant."
@ -210,19 +233,15 @@ Cate special text banner can de reachable via `998', `cat' or `random*'.
(spacemacs-buffer//get-banner-path 1))) (spacemacs-buffer//get-banner-path 1)))
(t (spacemacs-buffer//get-banner-path 1))))) (t (spacemacs-buffer//get-banner-path 1)))))
(defvar spacemacs-buffer--random-banner nil
"The random banner chosen.")
(defun spacemacs-buffer//choose-random-text-banner (&optional all) (defun spacemacs-buffer//choose-random-text-banner (&optional all)
"Return the full path of a banner chosen randomly. "Return the full path of a banner chosen randomly.
If ALL is non-nil then truly all banners can be selected." If ALL is non-nil then truly all banners can be selected."
(setq spacemacs-buffer--random-banner (unless spacemacs-buffer--random-banner
(or spacemacs-buffer--random-banner (let* ((files (directory-files spacemacs-banner-directory t ".*\.txt"))
(let* ((files (directory-files spacemacs-banner-directory t ".*\.txt")) (count (length files))
(count (length files)) ;; -2 to remove the two last ones (easter eggs)
;; -2 to remove the two last ones (easter eggs) (choice (random (- count (if all 0 2)))))
(choice (random (- count (if all 0 2))))) (setq spacemacs-buffer--random-banner (nth choice files)))))
(nth choice files)))))
(defun spacemacs-buffer//get-banner-path (index) (defun spacemacs-buffer//get-banner-path (index)
"Return the full path to banner with index INDEX." "Return the full path to banner with index INDEX."
@ -270,14 +289,14 @@ Right justified, based on the Spacemacs buffers window width."
(intern (file-name-extension badge-path)))) (intern (file-name-extension badge-path))))
(create-image badge-path))) (create-image badge-path)))
(badge-size (when badge (car (image-size badge)))) (badge-size (when badge (car (image-size badge))))
(heart-path spacemacs-purple-heart-png) (build-by (concat "Made with "
(heart (when (and (display-graphic-p) (if (and dotspacemacs-startup-buffer-show-icons
(image-type-available-p (display-graphic-p)
(intern (file-name-extension badge-path)))) (or (fboundp 'all-the-icons-faicon)
(create-image heart-path))) (require 'all-the-icons nil 'noerror)))
(heart-size (when heart (car (image-size heart)))) (all-the-icons-faicon "heart" :height 0.8 :v-adjust -0.05)
(build-lhs "Made with ") "heart")
(build-rhs " by the community") " by the community"))
(proudly-free "Proudly free software") (proudly-free "Proudly free software")
(gplv3-path spacemacs-gplv3-official-png) (gplv3-path spacemacs-gplv3-official-png)
(gplv3 (when (and (display-graphic-p) (gplv3 (when (and (display-graphic-p)
@ -286,35 +305,28 @@ Right justified, based on the Spacemacs buffers window width."
(create-image gplv3-path))) (create-image gplv3-path)))
(gplv3-size (when gplv3 (car (image-size gplv3)))) (gplv3-size (when gplv3 (car (image-size gplv3))))
(buffer-read-only nil)) (buffer-read-only nil))
(when (or badge heart gplv3) (goto-char (point-max))
(goto-char (point-max)) (spacemacs-buffer/insert-page-break)
(spacemacs-buffer/insert-page-break) (insert "\n")
(insert "\n") (when badge
(when badge (insert-image badge)
(insert-image badge) (spacemacs-buffer//center-line badge-size)
(spacemacs-buffer//center-line badge-size)) (insert "\n\n"))
(when heart (insert build-by)
(when badge (insert "\n\n")) (spacemacs-buffer//center-line (length build-by))
(insert build-lhs) (insert "\n\n")
(insert-image heart) (widget-create 'url-link
(insert build-rhs) :tag proudly-free
(spacemacs-buffer//center-line (+ (length build-lhs) :help-echo "What is free software?"
heart-size :mouse-face 'highlight
(length build-rhs))) :follow-link "\C-m"
(insert "\n")) "https://www.gnu.org/philosophy/free-sw.en.html")
(when gplv3 (spacemacs-buffer//center-line (+ 2 (length proudly-free)))
(insert "\n") (when gplv3
(widget-create 'url-link (insert "\n\n")
:tag proudly-free (insert-image gplv3)
:help-echo "What is free software?" (spacemacs-buffer//center-line gplv3-size)
:mouse-face 'highlight (insert "\n")))))
:follow-link "\C-m"
"https://www.gnu.org/philosophy/free-sw.en.html")
(spacemacs-buffer//center-line (+ 2 (length proudly-free)))
(insert "\n\n")
(insert-image gplv3)
(spacemacs-buffer//center-line gplv3-size)
(insert "\n"))))))
(defmacro spacemacs-buffer||notes-adapt-caption-to-width (caption (defmacro spacemacs-buffer||notes-adapt-caption-to-width (caption
caption-length caption-length
@ -334,14 +346,6 @@ WIDTH: current external width of the note's frame."
(setq ,caption nil (setq ,caption nil
,caption-length 0)))) ,caption-length 0))))
(defvar spacemacs-buffer-note-preview-lines 5
"If it's a positive integer, show the notes first number of lines.
If nil, show the full note.")
(defvar spacemacs-buffer--note-preview-nr-of-removed-lines nil
"Store the number of removed lines from the notes:
Quick Help and Release Notes.")
(defun spacemacs-buffer//if-note-preview-remove-rest-of-note () (defun spacemacs-buffer//if-note-preview-remove-rest-of-note ()
"If `spacemacs-buffer-note-preview-lines' is a positive integer, "If `spacemacs-buffer-note-preview-lines' is a positive integer,
remove the rest of the note, after the variables line number." remove the rest of the note, after the variables line number."
@ -388,18 +392,18 @@ MIN-WIDTH is the minimal width of the frame, frame included. The frame will not
(paragraph-start "\f\\|[ \t]*$\\|[ \t]*[-+*] \\|[ \t]*[0-9]+[.)] ") (paragraph-start "\f\\|[ \t]*$\\|[ \t]*[-+*] \\|[ \t]*[0-9]+[.)] ")
(topcaption-length (if topcaption (length topcaption) 0)) (topcaption-length (if topcaption (length topcaption) 0))
(botcaption-length (if botcaption (length botcaption) 0))) (botcaption-length (if botcaption (length botcaption) 0)))
(setq max-width (or max-width width) ;; min-width defaults to 1
min-width (or min-width 1) ;; max-width defaults to width, but truncated between min-width and window-width
max-width (if (< max-width min-width) min-width max-width) (setq min-width (or min-width 1)
max-width (if (> max-width spacemacs-buffer--window-width) max-width (min (max (or max-width width) min-width)
spacemacs-buffer--window-width spacemacs-buffer--window-width))
max-width)) (cond
(when (< width min-width) ((< width min-width)
(setq width min-width (setq width min-width
fill-column (max 0 (- min-width 2 (* hpadding 2))))) fill-column (max 0 (- min-width 2 (* hpadding 2)))))
(when (> width max-width) ((> width max-width)
(setq width max-width (setq width max-width
fill-column (max 0 (- max-width 2 (* hpadding 2))))) fill-column (max 0 (- max-width 2 (* hpadding 2))))))
(spacemacs-buffer||notes-adapt-caption-to-width topcaption (spacemacs-buffer||notes-adapt-caption-to-width topcaption
topcaption-length topcaption-length
width) width)
@ -466,7 +470,8 @@ ADDITIONAL-WIDGETS: a function for inserting a widget under the frame."
(match-end 1) (match-end 1)
'type 'help-url 'type 'help-url
'help-args (list (match-string 1))))) 'help-args (list (match-string 1)))))
(funcall additional-widgets) (when additional-widgets
(funcall additional-widgets))
(spacemacs-buffer//center-line) (spacemacs-buffer//center-line)
(delete-trailing-whitespace (line-beginning-position) (delete-trailing-whitespace (line-beginning-position)
(line-end-position))))) (line-end-position)))))
@ -704,9 +709,6 @@ ARGS: format string arguments."
(when init-file-debug (when init-file-debug
(message "(Spacemacs) %s" (apply 'format msg args)))) (message "(Spacemacs) %s" (apply 'format msg args))))
(defvar spacemacs-buffer--errors nil
"List of errors during startup.")
(defun spacemacs-buffer/error (msg &rest args) (defun spacemacs-buffer/error (msg &rest args)
"Display MSG as an Error message in `*Messages*' buffer. "Display MSG as an Error message in `*Messages*' buffer.
ARGS: format string arguments." ARGS: format string arguments."
@ -784,7 +786,7 @@ instead of:
(let* ((func-name (spacemacs-buffer//startup-list-jump-func-name search-label)) (let* ((func-name (spacemacs-buffer//startup-list-jump-func-name search-label))
(func-name-symbol (intern func-name))) (func-name-symbol (intern func-name)))
(eval `(defun ,func-name-symbol () (eval `(defun ,func-name-symbol ()
(interactive) (interactive)
(unless (search-forward ,search-label (point-max) t) (unless (search-forward ,search-label (point-max) t)
(search-backward ,search-label (point-min) t)) (search-backward ,search-label (point-min) t))
,@(unless no-next-line ,@(unless no-next-line
@ -933,16 +935,23 @@ by pressing its number key."
(when (car list) (when (car list)
(insert list-display-name) (insert list-display-name)
(mapc (lambda (el) (mapc (lambda (el)
(insert "\n ") (let ((button-prefix
(let* ((button-text-prefix (concat
"\n "
(when dotspacemacs-show-startup-list-numbers (when dotspacemacs-show-startup-list-numbers
(format "%2s" (number-to-string (format "%2s " (number-to-string spacemacs-buffer--startup-list-nr)))
spacemacs-buffer--startup-list-nr)))) " "
(button-text (when dotspacemacs-startup-buffer-show-icons
(concat (cond
(when dotspacemacs-show-startup-list-numbers ((file-remote-p el)
(concat button-text-prefix " ")) (all-the-icons-octicon "radio-tower" :height 0.8 :v-adjust -0.05))
(abbreviate-file-name el)))) ((file-directory-p el)
(all-the-icons-icon-for-dir el))
(t
(all-the-icons-icon-for-file (file-name-nondirectory el) :height 0.8 :v-adjust -0.05))))
" "))
(button-text (abbreviate-file-name el)))
(insert button-prefix)
(widget-create 'push-button (widget-create 'push-button
:action `(lambda (&rest ignore) :action `(lambda (&rest ignore)
(find-file-existing ,el)) (find-file-existing ,el))
@ -950,6 +959,7 @@ by pressing its number key."
:follow-link "\C-m" :follow-link "\C-m"
:button-prefix "" :button-prefix ""
:button-suffix "" :button-suffix ""
:button-face nil
:format "%[%t%]" button-text)) :format "%[%t%]" button-text))
(setq spacemacs-buffer--startup-list-nr (setq spacemacs-buffer--startup-list-nr
(1+ spacemacs-buffer--startup-list-nr))) (1+ spacemacs-buffer--startup-list-nr)))
@ -960,19 +970,23 @@ by pressing its number key."
"Insert an interactive grouped list of files in the home buffer. "Insert an interactive grouped list of files in the home buffer.
LIST-DISPLAY-NAME: the displayed title of the list. LIST-DISPLAY-NAME: the displayed title of the list.
GROUPED-LIST: a list of string pathnames made interactive in this function." GROUPED-LIST: a list of string pathnames made interactive in this function."
(when (car grouped-list) (when (car-safe grouped-list)
(insert list-display-name) (insert list-display-name)
(mapc (lambda (group) (mapc (lambda (group)
(insert "\n ") (let* ((group-remote-p (file-remote-p (car group)))
(let* ((button-text-prefix (button-prefix
(when dotspacemacs-show-startup-list-numbers
(format "%2s" (number-to-string
spacemacs-buffer--startup-list-nr))))
(button-text-project
(concat (concat
"\n "
(when dotspacemacs-show-startup-list-numbers (when dotspacemacs-show-startup-list-numbers
(concat button-text-prefix " ")) (format "%2s " (number-to-string spacemacs-buffer--startup-list-nr)))
(abbreviate-file-name (car group))))) " "
(when dotspacemacs-startup-buffer-show-icons
(if group-remote-p
(all-the-icons-octicon "radio-tower" :height 0.8 :v-adjust -0.05)
(all-the-icons-icon-for-dir (car group))))
" "))
(button-text-project (abbreviate-file-name (car group))))
(insert button-prefix)
(widget-create 'push-button (widget-create 'push-button
:action `(lambda (&rest ignore) :action `(lambda (&rest ignore)
(find-file-existing ,(car group))) (find-file-existing ,(car group)))
@ -984,16 +998,20 @@ GROUPED-LIST: a list of string pathnames made interactive in this function."
(setq spacemacs-buffer--startup-list-nr (setq spacemacs-buffer--startup-list-nr
(1+ spacemacs-buffer--startup-list-nr)) (1+ spacemacs-buffer--startup-list-nr))
(mapc (lambda (el) (mapc (lambda (el)
(let* ((button-text-prefix (let* ((button-prefix
(when dotspacemacs-show-startup-list-numbers
(format "%2s" (number-to-string
spacemacs-buffer--startup-list-nr))))
(button-text-filename
(concat (concat
"\n "
(when dotspacemacs-show-startup-list-numbers (when dotspacemacs-show-startup-list-numbers
(concat button-text-prefix " ")) (format "%2s " (number-to-string spacemacs-buffer--startup-list-nr)))
(abbreviate-file-name el)))) " "
(insert "\n ") (when dotspacemacs-startup-buffer-show-icons
(if (or group-remote-p
(file-remote-p (concat (car group) el)))
(all-the-icons-octicon "radio-tower" :height 0.8 :v-adjust -0.05)
(all-the-icons-icon-for-file (file-name-nondirectory el) :height 0.8 :v-adjust -0.05)))
" "))
(button-text-filename (abbreviate-file-name el)))
(insert button-prefix)
(widget-create 'push-button (widget-create 'push-button
:action `(lambda (&rest ignore) :action `(lambda (&rest ignore)
(find-file-existing (find-file-existing
@ -1015,20 +1033,28 @@ LIST: a list of string bookmark names made interactive in this function."
(when (car list) (when (car list)
(insert list-display-name) (insert list-display-name)
(mapc (lambda (el) (mapc (lambda (el)
(insert "\n ")
(let* ((filename (bookmark-get-filename el)) (let* ((filename (bookmark-get-filename el))
(button-text-prefix (button-prefix
(when dotspacemacs-show-startup-list-numbers
(format "%2s" (number-to-string
spacemacs-buffer--startup-list-nr))))
(button-text
(concat (concat
"\n "
(when dotspacemacs-show-startup-list-numbers (when dotspacemacs-show-startup-list-numbers
(concat button-text-prefix " ")) (format "%2s " (number-to-string spacemacs-buffer--startup-list-nr)))
(if filename " "
(format "%s - %s" (when dotspacemacs-startup-buffer-show-icons
el (abbreviate-file-name filename)) (cond
(format "%s" el))))) ((file-remote-p filename)
(all-the-icons-octicon "radio-tower" :height 0.8 :v-adjust -0.05))
((file-directory-p filename)
(all-the-icons-icon-for-dir filename))
(t
(all-the-icons-icon-for-file (file-name-nondirectory filename) :height 0.8 :v-adjust -0.05))))
" "))
(button-text
(if filename
(format "%s - %s"
el (abbreviate-file-name filename))
(format "%s" el))))
(insert button-prefix)
(widget-create 'push-button (widget-create 'push-button
:action `(lambda (&rest ignore) (bookmark-jump ,el)) :action `(lambda (&rest ignore) (bookmark-jump ,el))
:mouse-face 'highlight :mouse-face 'highlight
@ -1045,13 +1071,11 @@ LIST: a list of string bookmark names made interactive in this function."
TYPES: list of `org-mode' types to fetch." TYPES: list of `org-mode' types to fetch."
(require 'org-agenda) (require 'org-agenda)
(let ((date (calendar-gregorian-from-absolute (org-today)))) (let ((date (calendar-gregorian-from-absolute (org-today))))
(apply #'append (cl-loop for file in (org-agenda-files nil 'ifmode)
(cl-loop for file in (org-agenda-files nil 'ifmode) append (spacemacs-buffer//make-org-items
collect
(spacemacs-buffer//make-org-items
file file
(apply 'org-agenda-get-day-entries file date (apply 'org-agenda-get-day-entries file date
types)))))) types)))))
(defun spacemacs-buffer//agenda-list () (defun spacemacs-buffer//agenda-list ()
"Return today's agenda." "Return today's agenda."
@ -1067,23 +1091,17 @@ TYPES: list of `org-mode' types to fetch."
"Make a spacemacs-buffer org item list. "Make a spacemacs-buffer org item list.
FILE: file name. FILE: file name.
ITEMS:" ITEMS:"
(cl-loop (cl-loop for item in items
for item in items collect (spacemacs-buffer//make-org-item file item)))
collect
(spacemacs-buffer//make-org-item file item)))
(defun spacemacs-buffer//make-org-item (file item) (defun spacemacs-buffer//make-org-item (file item)
"Make a spacemacs-buffer version of an org item. "Make a spacemacs-buffer version of an org item.
FILE: file name. FILE: file name.
ITEM:" ITEM:"
(list (cons "text" `(("text" . ,(get-text-property 0 'txt item))
(get-text-property 0 'txt item)) ("file" . ,file)
(cons "file" file) ("pos" . ,(marker-position (get-text-property 0 'org-marker item)))
(cons "pos" ("time" . ,(get-text-property 0 'time item))))
(marker-position
(get-text-property 0 'org-marker item)))
(cons "time"
(get-text-property 0 'time item))))
(defun spacemacs-buffer//org-jump (el) (defun spacemacs-buffer//org-jump (el)
"Action executed when using an item in the home buffer's todo list. "Action executed when using an item in the home buffer's todo list.
@ -1122,25 +1140,27 @@ LIST: list of `org-agenda' entries in the todo list."
(string< (cdr (assoc "time" a)) (string< (cdr (assoc "time" a))
(cdr (assoc "time" b)))))))) (cdr (assoc "time" b))))))))
(mapc (lambda (el) (mapc (lambda (el)
(insert "\n ") (let* ((button-prefix
(let* ((button-text-prefix
(when dotspacemacs-show-startup-list-numbers
(format "%2s" (number-to-string
spacemacs-buffer--startup-list-nr))))
(button-text
(concat (concat
"\n "
(when dotspacemacs-show-startup-list-numbers (when dotspacemacs-show-startup-list-numbers
(concat button-text-prefix " ")) (format "%2s " (number-to-string spacemacs-buffer--startup-list-nr)))
(format "%s %s %s" " "
(let ((filename (cdr (assoc "file" el)))) (when dotspacemacs-startup-buffer-show-icons
(if dotspacemacs-home-shorten-agenda-source (all-the-icons-octicon "primitive-dot" :height 1.0 :v-adjust 0.01))
(file-name-nondirectory filename) " "))
(abbreviate-file-name filename))) (button-text
(if (not (eq "" (cdr (assoc "time" el)))) (format "%s %s %s"
(format "- %s -" (let ((filename (cdr (assoc "file" el))))
(cdr (assoc "time" el))) (if dotspacemacs-home-shorten-agenda-source
"-") (file-name-nondirectory filename)
(cdr (assoc "text" el)))))) (abbreviate-file-name filename)))
(if (not (eq "" (cdr (assoc "time" el))))
(format "- %s -"
(cdr (assoc "time" el)))
"-")
(cdr (assoc "text" el)))))
(insert button-prefix)
(widget-create 'push-button (widget-create 'push-button
:action `(lambda (&rest ignore) :action `(lambda (&rest ignore)
(spacemacs-buffer//org-jump ',el)) (spacemacs-buffer//org-jump ',el))
@ -1173,15 +1193,30 @@ SEQ, START and END are the same arguments as for `cl-subseq'"
(cl-subseq seq start (and (number-or-marker-p end) (cl-subseq seq start (and (number-or-marker-p end)
(min len end))))) (min len end)))))
(defun spacemacs-buffer//propertize-heading (icon text &optional shortcut-char)
(concat
(when dotspacemacs-startup-buffer-show-icons
(concat (concat icon " ")))
(propertize text 'face 'font-lock-keyword-face)
(when shortcut-char
(propertize (concat " (" shortcut-char ")")
'face 'font-lock-comment-face))))
(defun spacemacs-buffer//insert-errors () (defun spacemacs-buffer//insert-errors ()
(when (spacemacs-buffer//insert-string-list (when (spacemacs-buffer//insert-string-list
"Errors:" spacemacs-buffer--errors) (spacemacs-buffer//propertize-heading
(all-the-icons-material "error" :face 'font-lock-keyword-face)
"Errors:" "e")
spacemacs-buffer--errors)
(spacemacs-buffer||add-shortcut "e" "Errors:") (spacemacs-buffer||add-shortcut "e" "Errors:")
(insert spacemacs-buffer-list-separator))) (insert spacemacs-buffer-list-separator)))
(defun spacemacs-buffer//insert-warnings () (defun spacemacs-buffer//insert-warnings ()
(when (spacemacs-buffer//insert-string-list (when (spacemacs-buffer//insert-string-list
"Warnings:" spacemacs-buffer--warnings) (spacemacs-buffer//propertize-heading
(all-the-icons-material "warning" :face 'font-lock-keyword-face)
"Warnings:" "w")
spacemacs-buffer--warnings)
(spacemacs-buffer||add-shortcut "w" "Warnings:") (spacemacs-buffer||add-shortcut "w" "Warnings:")
(insert spacemacs-buffer-list-separator))) (insert spacemacs-buffer-list-separator)))
@ -1197,7 +1232,9 @@ SEQ, START and END are the same arguments as for `cl-subseq'"
(setq spacemacs-buffer//recent-files-list (setq spacemacs-buffer//recent-files-list
(spacemacs//subseq spacemacs-buffer//recent-files-list 0 list-size)) (spacemacs//subseq spacemacs-buffer//recent-files-list 0 list-size))
(when (spacemacs-buffer//insert-file-list (when (spacemacs-buffer//insert-file-list
"Recent Files:" (spacemacs-buffer//propertize-heading
(all-the-icons-octicon "history" :face 'font-lock-keyword-face :v-adjust -0.05)
"Recent Files:" "r")
spacemacs-buffer//recent-files-list) spacemacs-buffer//recent-files-list)
(spacemacs-buffer||add-shortcut "r" "Recent Files:")) (spacemacs-buffer||add-shortcut "r" "Recent Files:"))
(insert spacemacs-buffer-list-separator)) (insert spacemacs-buffer-list-separator))
@ -1206,7 +1243,9 @@ SEQ, START and END are the same arguments as for `cl-subseq'"
(unless recentf-mode (recentf-mode)) (unless recentf-mode (recentf-mode))
(unless projectile-mode (projectile-mode)) (unless projectile-mode (projectile-mode))
(when (spacemacs-buffer//insert-files-by-dir-list (when (spacemacs-buffer//insert-files-by-dir-list
"Recent Files by Project:" (spacemacs-buffer//propertize-heading
(all-the-icons-octicon "rocket" :face 'font-lock-keyword-face :v-adjust -0.05)
"Recent Files by Project:" "R")
(mapcar (lambda (group) (mapcar (lambda (group)
(cons (car group) (cons (car group)
(spacemacs//subseq (reverse (cdr group)) (spacemacs//subseq (reverse (cdr group))
@ -1220,15 +1259,19 @@ SEQ, START and END are the same arguments as for `cl-subseq'"
(defun spacemacs-buffer//insert-todos (list-size) (defun spacemacs-buffer//insert-todos (list-size)
(when (spacemacs-buffer//insert-todo-list (when (spacemacs-buffer//insert-todo-list
"ToDo:" (spacemacs-buffer//propertize-heading
(all-the-icons-octicon "check" :face 'font-lock-keyword-face :v-adjust -0.05)
"To-Do:" "d")
(spacemacs//subseq (spacemacs-buffer//todo-list) (spacemacs//subseq (spacemacs-buffer//todo-list)
0 list-size)) 0 list-size))
(spacemacs-buffer||add-shortcut "d" "ToDo:") (spacemacs-buffer||add-shortcut "d" "To-Do:")
(insert spacemacs-buffer-list-separator))) (insert spacemacs-buffer-list-separator)))
(defun spacemacs-buffer//insert-agenda (list-size) (defun spacemacs-buffer//insert-agenda (list-size)
(when (spacemacs-buffer//insert-todo-list (when (spacemacs-buffer//insert-todo-list
"Agenda:" (spacemacs-buffer//propertize-heading
(all-the-icons-octicon "calendar" :face 'font-lock-keyword-face :v-adjust -0.05)
"Agenda:" "c")
(spacemacs//subseq (spacemacs-buffer//agenda-list) (spacemacs//subseq (spacemacs-buffer//agenda-list)
0 list-size)) 0 list-size))
(spacemacs-buffer||add-shortcut "c" "Agenda:") (spacemacs-buffer||add-shortcut "c" "Agenda:")
@ -1239,7 +1282,9 @@ SEQ, START and END are the same arguments as for `cl-subseq'"
(helm-mode)) (helm-mode))
(require 'bookmark) (require 'bookmark)
(when (spacemacs-buffer//insert-bookmark-list (when (spacemacs-buffer//insert-bookmark-list
"Bookmarks:" (spacemacs-buffer//propertize-heading
(all-the-icons-octicon "bookmark" :face 'font-lock-keyword-face :v-adjust -0.05)
"Bookmarks:" "b")
(spacemacs//subseq (bookmark-all-names) (spacemacs//subseq (bookmark-all-names)
0 list-size)) 0 list-size))
(spacemacs-buffer||add-shortcut "b" "Bookmarks:") (spacemacs-buffer||add-shortcut "b" "Bookmarks:")
@ -1248,7 +1293,9 @@ SEQ, START and END are the same arguments as for `cl-subseq'"
(defun spacemacs-buffer//insert-projects (list-size) (defun spacemacs-buffer//insert-projects (list-size)
(unless projectile-mode (projectile-mode)) (unless projectile-mode (projectile-mode))
(when (spacemacs-buffer//insert-file-list (when (spacemacs-buffer//insert-file-list
"Projects:" (spacemacs-buffer//propertize-heading
(all-the-icons-octicon "rocket" :face 'font-lock-keyword-face :v-adjust -0.05)
"Projects:" "p")
(spacemacs//subseq (projectile-relevant-known-projects) (spacemacs//subseq (projectile-relevant-known-projects)
0 list-size)) 0 list-size))
(spacemacs-buffer||add-shortcut "p" "Projects:") (spacemacs-buffer||add-shortcut "p" "Projects:")
@ -1259,23 +1306,30 @@ SEQ, START and END are the same arguments as for `cl-subseq'"
(defun spacemacs-buffer//do-insert-startupify-lists () (defun spacemacs-buffer//do-insert-startupify-lists ()
"Insert the startup lists in the current buffer." "Insert the startup lists in the current buffer."
(setq spacemacs-buffer--startup-list-nr 1) (setq spacemacs-buffer--startup-list-nr 1)
(dolist (els (append '(warnings) dotspacemacs-startup-lists)) (let ((dotspacemacs-startup-buffer-show-icons dotspacemacs-startup-buffer-show-icons))
(let ((el (or (car-safe els) els)) (if (display-graphic-p)
(list-size (or (cdr-safe els) (unless (or (fboundp 'all-the-icons-octicon)
spacemacs-buffer-startup-lists-length))) (require 'all-the-icons nil 'noerror))
(cond (message "Package `all-the-icons' isn't installed")
((eq el 'warnings) (setq dotspacemacs-startup-buffer-show-icons nil))
(spacemacs-buffer//insert-errors) (setq dotspacemacs-startup-buffer-show-icons nil))
(spacemacs-buffer//insert-warnings)) (dolist (els (append '(warnings) dotspacemacs-startup-lists))
((eq el 'recents) (spacemacs-buffer//insert-recent-files list-size)) (let ((el (or (car-safe els) els))
((eq el 'recents-by-project) (list-size (or (cdr-safe els)
(spacemacs-buffer//insert-recent-files-by-project list-size)) spacemacs-buffer-startup-lists-length)))
((eq el 'todos) (spacemacs-buffer//insert-todos list-size)) (cond
((eq el 'agenda) (spacemacs-buffer//insert-agenda list-size)) ((eq el 'warnings)
((eq el 'bookmarks) (spacemacs-buffer//insert-bookmarks list-size)) (spacemacs-buffer//insert-errors)
((and (eq el 'projects) (spacemacs-buffer//insert-warnings))
(fboundp 'projectile-mode)) ((eq el 'recents) (spacemacs-buffer//insert-recent-files list-size))
(spacemacs-buffer//insert-projects list-size)))))) ((eq el 'recents-by-project)
(spacemacs-buffer//insert-recent-files-by-project list-size))
((eq el 'todos) (spacemacs-buffer//insert-todos list-size))
((eq el 'agenda) (spacemacs-buffer//insert-agenda list-size))
((eq el 'bookmarks) (spacemacs-buffer//insert-bookmarks list-size))
((and (eq el 'projects)
(fboundp 'projectile-mode))
(spacemacs-buffer//insert-projects list-size)))))))
(defun spacemacs-buffer//get-buffer-width () (defun spacemacs-buffer//get-buffer-width ()
"Return the length of longest line in the current buffer." "Return the length of longest line in the current buffer."
@ -1284,8 +1338,7 @@ SEQ, START and END are the same arguments as for `cl-subseq'"
(let ((current-max 0)) (let ((current-max 0))
(while (not (eobp)) (while (not (eobp))
(let ((line-length (- (line-end-position) (line-beginning-position)))) (let ((line-length (- (line-end-position) (line-beginning-position))))
(if (< current-max line-length) (setq current-max (max current-max line-length)))
(setq current-max line-length)))
(forward-line 1)) (forward-line 1))
current-max))) current-max)))
@ -1294,12 +1347,11 @@ SEQ, START and END are the same arguments as for `cl-subseq'"
(let* ((lists-width (spacemacs-buffer//get-buffer-width)) (let* ((lists-width (spacemacs-buffer//get-buffer-width))
(margin (max 0 (- spacemacs-buffer--buttons-position (margin (max 0 (- spacemacs-buffer--buttons-position
spacemacs-buffer-buttons-startup-lists-offset))) spacemacs-buffer-buttons-startup-lists-offset)))
(final-padding (if (< spacemacs-buffer--window-width (width-diff (- spacemacs-buffer--window-width lists-width))
(+ margin lists-width)) (final-padding (cond
(max 0 (floor (/ (- spacemacs-buffer--window-width ((>= width-diff margin) margin)
lists-width) ((< width-diff 0) 0)
2))) (t (floor (/ width-diff 2))))))
margin)))
(goto-char (point-min)) (goto-char (point-min))
(while (not (eobp)) (while (not (eobp))
(beginning-of-line) (beginning-of-line)
@ -1328,13 +1380,6 @@ SEQ, START and END are the same arguments as for `cl-subseq'"
(search-forward "[") (search-forward "[")
(left-char 2)))) (left-char 2))))
(defvar spacemacs-buffer--idle-numbers-timer nil
"This stores the idle numbers timer.")
(defvar spacemacs-buffer--startup-list-number nil
"This accumulates the numbers that are typed in the home buffer.
It's cleared when the idle timer runs.")
(defun spacemacs-buffer/jump-to-number-startup-list-line () (defun spacemacs-buffer/jump-to-number-startup-list-line ()
"Jump to the startup list line with the typed number. "Jump to the startup list line with the typed number.
@ -1358,10 +1403,10 @@ can be adjusted with the variable:
'spacemacs-buffer/stop-waiting-for-additional-numbers)))) 'spacemacs-buffer/stop-waiting-for-additional-numbers))))
(defun spacemacs-buffer//re-line-starts-with-nr-space (nr-string) (defun spacemacs-buffer//re-line-starts-with-nr-space (nr-string)
(concat "^\s?*" nr-string " ")) (concat "^ +" nr-string "[0-9]* +. "))
(defun spacemacs-buffer/jump-to-line-starting-with-nr-space (nr-string) (defun spacemacs-buffer/jump-to-line-starting-with-nr-space (nr-string)
"Jump to the line number that starts with NR." "Jump to the line begins with NR-STRING, skipping non-digit prefix."
(let ((prev-point (point))) (let ((prev-point (point)))
(goto-char (window-start)) (goto-char (window-start))
(if (not (re-search-forward (if (not (re-search-forward
@ -1376,10 +1421,8 @@ can be adjusted with the variable:
(let (message-log-max) ; only show in minibuffer (let (message-log-max) ; only show in minibuffer
(message "Couldn't find startup list number: %s" (message "Couldn't find startup list number: %s"
spacemacs-buffer--startup-list-number))) spacemacs-buffer--startup-list-number)))
(back-to-indentation)
(message "Opening file/dir: %s" (message "Opening file/dir: %s"
(replace-regexp-in-string "^\s*" "" (widget-value (widget-at (point))))
(widget-value (widget-at (point)))))
(widget-button-press (point))))) (widget-button-press (point)))))
(defun spacemacs-buffer/stop-waiting-for-additional-numbers () (defun spacemacs-buffer/stop-waiting-for-additional-numbers ()
@ -1408,9 +1451,6 @@ can be adjusted with the variable:
(force-mode-line-update) (force-mode-line-update)
(spacemacs-buffer/goto-link-line))) (spacemacs-buffer/goto-link-line)))
(defvar spacemacs-buffer--last-width nil
"Previous width of spacemacs-buffer.")
(defun spacemacs-buffer/goto-buffer (&optional refresh) (defun spacemacs-buffer/goto-buffer (&optional refresh)
"Create the special buffer for `spacemacs-buffer-mode' and switch to it. "Create the special buffer for `spacemacs-buffer-mode' and switch to it.
REFRESH if the buffer should be redrawn. REFRESH if the buffer should be redrawn.
@ -1443,10 +1483,10 @@ If a prefix argument is given, switch to it in an other, possibly new window."
(spacemacs-buffer/insert-banner-and-buttons) (spacemacs-buffer/insert-banner-and-buttons)
(when (bound-and-true-p spacemacs-initialized) (when (bound-and-true-p spacemacs-initialized)
(spacemacs-buffer//notes-redisplay-current-note) (spacemacs-buffer//notes-redisplay-current-note)
(configuration-layer/display-summary emacs-start-time)
(when dotspacemacs-startup-lists (when dotspacemacs-startup-lists
(spacemacs-buffer/insert-startup-lists)) (spacemacs-buffer/insert-startup-lists))
(spacemacs-buffer//insert-footer) (spacemacs-buffer//insert-footer)
(configuration-layer/display-summary emacs-start-time)
(spacemacs-buffer/set-mode-line spacemacs--default-mode-line) (spacemacs-buffer/set-mode-line spacemacs--default-mode-line)
(force-mode-line-update) (force-mode-line-update)
(spacemacs-buffer-mode))) (spacemacs-buffer-mode)))

View File

@ -246,9 +246,10 @@ Note: the hooked function is not executed when in dumped mode."
(when spacemacs--delayed-user-theme (when spacemacs--delayed-user-theme
(spacemacs/load-theme spacemacs--delayed-user-theme (spacemacs/load-theme spacemacs--delayed-user-theme
spacemacs--fallback-theme t)) spacemacs--fallback-theme t))
(configuration-layer/display-summary emacs-start-time)
(spacemacs-buffer//startup-hook) (spacemacs-buffer//startup-hook)
(configuration-layer/display-summary emacs-start-time)
(spacemacs/check-for-new-version nil spacemacs-version-check-interval) (spacemacs/check-for-new-version nil spacemacs-version-check-interval)
(spacemacs-buffer/goto-link-line)
(setq spacemacs-initialized t) (setq spacemacs-initialized t)
(setq gc-cons-threshold (car dotspacemacs-gc-cons) (setq gc-cons-threshold (car dotspacemacs-gc-cons)
gc-cons-percentage (cadr dotspacemacs-gc-cons)) gc-cons-percentage (cadr dotspacemacs-gc-cons))

View File

@ -202,6 +202,11 @@ It should only modify the values of Spacemacs settings."
;; The minimum delay in seconds between number key presses. (default 0.4) ;; The minimum delay in seconds between number key presses. (default 0.4)
dotspacemacs-startup-buffer-multi-digit-delay 0.4 dotspacemacs-startup-buffer-multi-digit-delay 0.4
;; If non-nil, show file icons for entries and headings on Spacemacs home buffer.
;; This has no effect in terminal or if "all-the-icons" package or the font
;; is not installed. (default nil)
dotspacemacs-startup-buffer-show-icons nil
;; Default major mode for a new empty buffer. Possible values are mode ;; Default major mode for a new empty buffer. Possible values are mode
;; names such as `text-mode'; and `nil' to use Fundamental mode. ;; names such as `text-mode'; and `nil' to use Fundamental mode.
;; (default `text-mode') ;; (default `text-mode')

View File

@ -29,7 +29,6 @@
company company
(company-posframe :toggle auto-completion-use-company-posframe) (company-posframe :toggle auto-completion-use-company-posframe)
(company-box :toggle auto-completion-use-company-box) (company-box :toggle auto-completion-use-company-box)
(all-the-icons :toggle auto-completion-use-company-box)
(company-quickhelp :toggle auto-completion-enable-help-tooltip) (company-quickhelp :toggle auto-completion-enable-help-tooltip)
(company-statistics :toggle auto-completion-enable-sort-by-usage) (company-statistics :toggle auto-completion-enable-sort-by-usage)
counsel counsel
@ -161,65 +160,47 @@
(unless (eq auto-completion-enable-help-tooltip 'manual) (unless (eq auto-completion-enable-help-tooltip 'manual)
(company-quickhelp-mode)))))) (company-quickhelp-mode))))))
(defun auto-completion/init-all-the-icons ()
(use-package all-the-icons
:after company
:config
(progn
(eval-and-compile
;; Icons selected by liguangsheng
;; https://github.com/liguangsheng/emacsd/blob/master/lisp/init-completion.el
(defun my-company-box-icon (family icon &rest args)
"Defines icons using `all-the-icons' for `company-box'."
(when icon
(let ((icon (pcase family
('octicon (all-the-icons-octicon icon :height 0.8 :v-adjust -0.05 args))
('faicon (all-the-icons-faicon icon :height 0.8 :v-adjust -0.0575))
('material (all-the-icons-material icon :height 0.8 :v-adjust -0.225 args))
('alltheicon (all-the-icons-alltheicon icon :height 0.8 args)))))
(unless (symbolp icon)
(concat icon
(propertize " " 'face 'variable-pitch)))))))
(setq company-box-icons-all-the-icons
`((Unknown . ,(my-company-box-icon 'octicon "file-text"))
(Text . ,(my-company-box-icon 'faicon "file-text-o"))
(Method . ,(my-company-box-icon 'faicon "cube"))
(Function . ,(my-company-box-icon 'faicon "cube"))
(Constructor . ,(my-company-box-icon 'faicon "cube"))
(Field . ,(my-company-box-icon 'faicon "tag"))
(Variable . ,(my-company-box-icon 'faicon "tag"))
(Class . ,(my-company-box-icon 'faicon "cog"))
(Interface . ,(my-company-box-icon 'faicon "cogs"))
(Module . ,(my-company-box-icon 'alltheicon "less"))
(Property . ,(my-company-box-icon 'faicon "wrench"))
(Unit . ,(my-company-box-icon 'faicon "tag"))
(Value . ,(my-company-box-icon 'faicon "tag"))
(Enum . ,(my-company-box-icon 'faicon "file-text-o"))
(Keyword . ,(my-company-box-icon 'material "format_align_center"))
(Snippet . ,(my-company-box-icon 'material "content_paste"))
(Color . ,(my-company-box-icon 'material "palette"))
(File . ,(my-company-box-icon 'faicon "file"))
(Reference . ,(my-company-box-icon 'faicon "tag"))
(Folder . ,(my-company-box-icon 'faicon "folder"))
(EnumMember . ,(my-company-box-icon 'faicon "tag"))
(Constant . ,(my-company-box-icon 'faicon "tag"))
(Struct . ,(my-company-box-icon 'faicon "cog"))
(Event . ,(my-company-box-icon 'faicon "bolt"))
(Operator . ,(my-company-box-icon 'faicon "tag"))
(TypeParameter . ,(my-company-box-icon 'faicon "cog"))
(Template . ,(my-company-box-icon 'octicon "file-code")))))))
(defun auto-completion/init-company-box () (defun auto-completion/init-company-box ()
(use-package company-box (use-package company-box
:hook '(company-mode . company-box-mode) :hook '(company-mode . company-box-mode)
:commands 'company-box-doc-manually :commands 'company-box-doc-manually
:init (setq company-box-icons-alist 'company-box-icons-all-the-icons) :custom
(company-box-backends-colors nil)
(company-box-max-candidates 1000)
(company-box-doc-enable nil)
(company-box-icons-alist 'company-box-icons-all-the-icons)
(company-box-icons-all-the-icons
`((Unknown . ,(all-the-icons-octicon "file-text" :height 0.8 :v-adjust -0.05))
(Text . ,(all-the-icons-faicon "file-text-o" :height 0.8 :v-adjust -0.0575))
(Method . ,(all-the-icons-faicon "cube" :height 0.8 :v-adjust -0.0575))
(Function . ,(all-the-icons-faicon "cube" :height 0.8 :v-adjust -0.0575))
(Constructor . ,(all-the-icons-faicon "cube" :height 0.8 :v-adjust -0.0575))
(Field . ,(all-the-icons-faicon "tag" :height 0.8 :v-adjust -0.0575))
(Variable . ,(all-the-icons-faicon "tag" :height 0.8 :v-adjust -0.0575))
(Class . ,(all-the-icons-faicon "cog" :height 0.8 :v-adjust -0.0575))
(Interface . ,(all-the-icons-faicon "cogs" :height 0.8 :v-adjust -0.0575))
(Module . ,(all-the-icons-alltheicon "less" :height 0.8))
(Property . ,(all-the-icons-faicon "wrench" :height 0.8 :v-adjust -0.0575))
(Unit . ,(all-the-icons-faicon "tag" :height 0.8 :v-adjust -0.0575))
(Value . ,(all-the-icons-faicon "tag" :height 0.8 :v-adjust -0.0575))
(Enum . ,(all-the-icons-faicon "file-text-o" :height 0.8 :v-adjust -0.0575))
(Keyword . ,(all-the-icons-material "format_align_center" :height 0.8 :v-adjust -0.225))
(Snippet . ,(all-the-icons-material "content_paste" :height 0.8 :v-adjust -0.225))
(Color . ,(all-the-icons-material "palette" :height 0.8 :v-adjust -0.225))
(File . ,(all-the-icons-faicon "file" :height 0.8 :v-adjust -0.0575))
(Reference . ,(all-the-icons-faicon "tag" :height 0.8 :v-adjust -0.0575))
(Folder . ,(all-the-icons-faicon "folder" :height 0.8 :v-adjust -0.0575))
(EnumMember . ,(all-the-icons-faicon "tag" :height 0.8 :v-adjust -0.0575))
(Constant . ,(all-the-icons-faicon "tag" :height 0.8 :v-adjust -0.0575))
(Struct . ,(all-the-icons-faicon "cog" :height 0.8 :v-adjust -0.0575))
(Event . ,(all-the-icons-faicon "bolt" :height 0.8 :v-adjust -0.0575))
(Operator . ,(all-the-icons-faicon "tag" :height 0.8 :v-adjust -0.0575))
(TypeParameter . ,(all-the-icons-faicon "cog" :height 0.8 :v-adjust -0.0575))
(Template . ,(all-the-icons-octicon "file-code" :height 0.8 :v-adjust -0.05))))
:init
:config :config
(progn (progn
(spacemacs|hide-lighter company-box-mode) (spacemacs|hide-lighter company-box-mode)
(setq company-box-backends-colors nil
company-box-max-candidates 1000
company-box-doc-enable nil)
(add-hook 'company-box-selection-hook (add-hook 'company-box-selection-hook
(lambda (selection frame) (company-box-doc--hide frame))) (lambda (selection frame) (company-box-doc--hide frame)))
(cl-case auto-completion-enable-help-tooltip (cl-case auto-completion-enable-help-tooltip

View File

@ -23,6 +23,7 @@
(setq spacemacs-visual-packages (setq spacemacs-visual-packages
'( '(
all-the-icons
(ansi-colors :location built-in) (ansi-colors :location built-in)
desktop desktop
;; `display-fill-column-indicator' is available in Emacs 27+ ;; `display-fill-column-indicator' is available in Emacs 27+
@ -34,6 +35,9 @@
popwin popwin
(zoom-frm :location local))) (zoom-frm :location local)))
(defun spacemacs-visual/init-all-the-icons ()
(use-package all-the-icons
:defer t))
(defun spacemacs-visual/init-ansi-colors () (defun spacemacs-visual/init-ansi-colors ()
(add-hook 'compilation-filter-hook (add-hook 'compilation-filter-hook