Minor updates.

This commit is contained in:
Derek Taylor
2020-08-11 17:27:59 -05:00
parent c00618a23a
commit 367af05623
154 changed files with 2484 additions and 1801 deletions

View File

@@ -182,6 +182,8 @@ PLIST can have the following properties:
;; Don't scroll to follow cursor
(setq-local scroll-preserve-screen-position nil)
(setq-local auto-hscroll-mode nil)
;; Line numbers are ugly with large margins
(setq-local display-line-numbers-type nil)
(cl-loop for (car . _cdr) in fringe-indicator-alist
collect (cons car nil) into alist
finally do (setq fringe-indicator-alist alist))

View File

@@ -35,9 +35,10 @@
(when solaire-global-mode
(solaire-global-mode -1))))))
(add-hook! 'solaire-global-mode-hook
(add-hook! 'solaire-global-mode-hook :append
(defun +doom-solaire-swap-bg-faces-maybe-h ()
(and solaire-global-mode
(and (bound-and-true-p solaire-global-mode)
(symbolp doom-theme)
(string-prefix-p "doom-" (symbol-name doom-theme))
(solaire-mode-swap-bg))))

View File

@@ -1,5 +1,5 @@
;; -*- no-byte-compile: t; -*-
;;; ui/doom/packages.el
(package! doom-themes :pin "b1c43a324d3000bd9972030aecf98c9cc8376337")
(package! solaire-mode :pin "25d1aafc03e3c7f9487532464dbffacce10d0c5d")
(package! doom-themes :pin "2c71a9fe4edcdcd8844e60c6cddc5faf954dfc72")
(package! solaire-mode :pin "d3e8f9e1e3109a93a39602deac6a21be497f7f16")

View File

@@ -20,7 +20,12 @@
;; directed at another user other than the author.
("NOTE" success bold)
;; For things that just gotta go and will soon be gone.
("DEPRECATED" font-lock-doc-face bold)))
("DEPRECATED" font-lock-doc-face bold)
;; For a known bug that needs a workaround
("BUG" error bold)
;; For warning about a problematic or misguiding code
("XXX" font-lock-constant-face bold)))
(defadvice! +hl-todo-clamp-font-lock-fontify-region-a (orig-fn &rest args)
"Fix an `args-out-of-range' error in some modes."

View File

@@ -19,7 +19,8 @@
#'+indent-guides-init-faces-h)
;; `highlight-indent-guides' breaks when `org-indent-mode' is active
(add-hook! 'org-indent-mode-hook
(add-hook! 'org-mode-local-vars-hook
(defun +indent-guides-disable-maybe-h ()
(when highlight-indent-guides-mode
(highlight-indent-guides-mode -1)))))
(and highlight-indent-guides-mode
(bound-and-true-p org-indent-mode)
(highlight-indent-guides-mode -1)))))

View File

@@ -356,7 +356,7 @@ Requires `anzu', also `evil-anzu' if using `evil-mode' for compatibility with
'((:eval
(propertize
(let ((buffer-file-name (buffer-file-name (buffer-base-buffer))))
(or (when buffer-file-name
(or (when (and (not (file-remote-p buffer-file-name)) buffer-file-name)
(if-let (project (doom-project-root buffer-file-name))
(let ((filename (or buffer-file-truename (file-truename buffer-file-name))))
(file-relative-name filename (concat project "..")))))
@@ -458,14 +458,17 @@ lines are selected, or the NxM dimensions of a block selection.")
;;; `+modeline-encoding'
(def-modeline-var! +modeline-encoding
'(:eval
(concat (coding-system-eol-type-mnemonic buffer-file-coding-system)
" "
(let ((sys (coding-system-plist buffer-file-coding-system)))
`(:eval
(let ((sys (coding-system-plist buffer-file-coding-system))
(eol (coding-system-eol-type-mnemonic buffer-file-coding-system)))
(concat (unless (equal eol ,(if IS-WINDOWS "CRLF" "LF"))
(concat " " eol " "))
(if (memq (plist-get sys :category)
'(coding-category-undecided coding-category-utf-8))
"UTF-8"
(upcase (symbol-name (plist-get sys :name))))))))
(unless (string-match-p "utf-8" (symbol-name buffer-file-coding-system))
"UTF-8 ")
(concat (upcase (symbol-name (plist-get sys :name)))
" "))))))
;; Clearer mnemonic labels for EOL styles
(setq eol-mnemonic-dos "CRLF"
@@ -491,7 +494,6 @@ lines are selected, or the NxM dimensions of a block selection.")
vc-mode " "))
" "
+modeline-encoding
" "
(+modeline-checker ("" +modeline-checker " "))))
(def-modeline! 'project

View File

@@ -2,7 +2,7 @@
;;; ui/modeline/packages.el
(unless (featurep! +light)
(package! doom-modeline :pin "2b308857677e983ca4eaedc36438ed94aadf9e65"))
(package! doom-modeline :pin "881e099fe02e3dd5ad66c51156fcdcc60e093a9b"))
(package! anzu :pin "7b8688c84d6032300d0c415182c7c1ad6cb7f819")
(when (featurep! :editor evil)
(package! evil-anzu :pin "d3f6ed4773b48767bd5f4708c7f083336a8a8a86"))

View File

@@ -364,8 +364,8 @@ Ugh, such an ugly hack."
(defadvice! +popup--ignore-window-parameters-a (orig-fn &rest args)
"Allow *interactive* window moving commands to traverse popups."
:around '(windmove-up windmove-down windmove-left windmove-right)
(letf! ((defun windmove-find-other-window (dir &optional arg window)
(window-in-direction
(pcase dir (`up 'above) (`down 'below) (_ dir))
window (bound-and-true-p +popup-mode) arg windmove-wrap-around t)))
(letf! (defun windmove-find-other-window (dir &optional arg window)
(window-in-direction
(pcase dir (`up 'above) (`down 'below) (_ dir))
window (bound-and-true-p +popup-mode) arg windmove-wrap-around t))
(apply orig-fn args)))

View File

@@ -345,7 +345,13 @@ Any non-nil value besides the above will be used as the raw value for
(defun +popup/other ()
"Cycle through popup windows, like `other-window'. Ignores regular windows."
(interactive)
(if-let (popups (+popup-windows))
(if-let (popups (cl-remove-if-not
(lambda (w) (or (+popup-window-p w)
;; This command should be able to hop between
;; windows with a `no-other-window'
;; parameter, since `other-window' won't.
(window-parameter w 'no-other-window)))
(window-list)))
(select-window (if (+popup-window-p)
(let ((window (selected-window)))
(or (car-safe (cdr (memq window popups)))

View File

@@ -8,7 +8,7 @@
centaur-tabs-set-bar 'left
centaur-tabs-set-modified-marker t
centaur-tabs-close-button ""
centaur-tabs-modified-marker ""
centaur-tabs-modified-marker ""
;; Scrolling (with the mouse wheel) past the end of the tab list
;; replaces the tab list with that of another Doom workspace. This
;; prevents that.

View File

@@ -1,4 +1,4 @@
;; -*- no-byte-compile: t; -*-
;;; ui/tabs/packages.el
(package! centaur-tabs :pin "2154fa9679c5fa02a2a7e3d4c739256fd991a789")
(package! centaur-tabs :pin "9114ef423e820eee3f9c6cb29e112fc22aee84dd")

View File

@@ -1,7 +1,7 @@
;; -*- no-byte-compile: t; -*-
;;; ui/treemacs/packages.el
(package! treemacs :pin "327bf63e58348e0b5070054477db801d5392cd75")
(package! treemacs :pin "644e9402f74dc6100a60fc2b54a2f94ba9bc52e0")
;; These packages have no :pin because they're in the same repo
(when (featurep! :editor evil +everywhere)
(package! treemacs-evil))

View File

@@ -48,7 +48,16 @@ The first character of the buffers changes to a highlighted, user-selectable
character.
+ Pros: the content of the buffers are always visible.
+ Cons: The displayed characters are small and difficult to see.
+ Cons: The display characters are small and difficult to see (see below for a way to enlarge them).
**** Custom font-face example
This changes the ace-window display to show a white letter with a red background. The box attribute adds some padding.
#+BEGIN_SRC elisp
(custom-set-faces!
'(aw-leading-char-face
:foreground "white" :background "red"
:weight bold :height 2.5 :box (:line-width 10 :color "red")))
#+END_SRC
** switch-window
Replaces the entire buffer with large letters.

View File

@@ -200,6 +200,10 @@ stored in `persp-save-dir'.")
(not (buffer-live-p buf)))
(add-hook 'persp-filter-save-buffers-functions #'+workspaces-dead-buffer-p)
;; Otherwise, buffers opened via bookmarks aren't treated as "real" and are
;; excluded from the buffer list.
(add-hook 'bookmark-after-jump-hook #'+workspaces-add-current-buffer-h)
;;
;; eshell
(persp-def-buffer-save/load

View File

@@ -1,4 +1,4 @@
;; -*- no-byte-compile: t; -*-
;;; ui/workspaces/packages.el
(package! persp-mode :pin "391a7dc248c9c04b7ad424c696bdff578e14dd2c")
(package! persp-mode :pin "14325c11f7a347717d7c3780f29b24a38c68fbfc")