dev: updating from latest

This commit is contained in:
Matt Nish-Lapidus 2024-03-13 12:16:01 -04:00
commit 1f966c2250
11 changed files with 64 additions and 46 deletions

View file

@ -406,6 +406,11 @@ the unwritable tidbits."
(unless doom-large-file-p
(apply fn args)))
(defadvice! doom--inhibit-saveplace-if-point-not-at-bol-a (&rest _)
"If something else has moved point, don't try to move it again."
:before-while #'save-place-find-file-hook
(bobp))
(defadvice! doom--dont-prettify-saveplace-cache-a (fn)
"`save-place-alist-to-file' uses `pp' to prettify the contents of its cache.
`pp' can be expensive for longer lists, and there's no reason to prettify cache

View file

@ -498,7 +498,7 @@ windows, switch to `doom-fallback-buffer'. Otherwise, delegate to original
(cons 'custom-theme-directory
(delq 'custom-theme-directory custom-theme-load-path)))
(defun doom--make-font-specs (face font)
(defun doom--make-font-specs (face font frame)
(let* ((base-specs (cadr (assq 'user (get face 'theme-face))))
(base-specs (or base-specs '((t nil))))
(attrs '(:family :foundry :slant :weight :height :width))
@ -509,14 +509,15 @@ windows, switch to `doom-fallback-buffer'. Otherwise, delegate to original
(plist (copy-tree (nth 1 spec))))
;; Alter only DISPLAY conditions matching this frame.
(when (or (memq display '(t default))
(face-spec-set-match-display display this-frame))
(face-spec-set-match-display display frame))
(dolist (attr attrs)
(setq plist (plist-put plist attr (face-attribute face attr)))))
(push (list display plist) new-specs)))
(nreverse new-specs)))
(defun doom-init-fonts-h (&optional reload)
"Loads `doom-font'."
(defun doom-init-fonts-h (&optional _reload)
"Loads `doom-font', `doom-serif-font', and `doom-variable-pitch-font'."
(let ((this-frame (selected-frame)))
(dolist (map `((default . ,doom-font)
(fixed-pitch . ,doom-font)
(fixed-pitch-serif . ,doom-serif-font)
@ -529,7 +530,7 @@ windows, switch to `doom-fallback-buffer'. Otherwise, delegate to original
(set-face-attribute face frame
:width 'normal :weight 'normal
:slant 'normal :font font)))
(let ((new-specs (doom--make-font-specs face font)))
(let ((new-specs (doom--make-font-specs face font this-frame)))
;; Don't save to `customized-face' so it's omitted from `custom-file'
;;(put face 'customized-face new-specs)
(custom-push-theme 'theme-face face 'user 'set new-specs)
@ -538,7 +539,7 @@ windows, switch to `doom-fallback-buffer'. Otherwise, delegate to original
(ignore-errors (doom--reset-inhibited-vars-h))
(if (string-prefix-p "Font not available" (error-message-string e))
(signal 'doom-font-error (list (font-get (cdr map) :family)))
(signal (car e) (cdr e))))))
(signal (car e) (cdr e)))))))
(when (fboundp 'set-fontset-font)
(let* ((fn (doom-rpartial #'member (font-family-list)))
(symbol-font (or doom-symbol-font

View file

@ -3,6 +3,11 @@
#+created: October 11, 2019
#+since: 2.0.0
#+begin_quote
*This module is deprecated.* Changes upstream to Twitter's API has rendered
twittering-mode non-functional, and there is no known alternative.
#+end_quote
* Description :unfold:
Enjoy twitter from emacs.

View file

@ -52,7 +52,7 @@ generate `completing-read' candidates."
;;;###autoload
(defun +default/diagnostics (&rest arg)
"List diagnostics for the current buffer/project.
If the the vertico and lsp modules are active, list lsp diagnostics for the
If the vertico and lsp modules are active, list lsp diagnostics for the
current project. Otherwise list them for the current buffer"
(interactive)
(cond ((and (modulep! :completion vertico)

View file

@ -116,7 +116,7 @@ the requested feature."
Does nothing if `+format-with-lsp' is nil or the active server doesn't support
the requested feature."
(and +format-with-lsp
(bound-and-true-p eglot-managed-mode)
(bound-and-true-p eglot--managed-mode)
(pcase op
('buffer (if (eglot--server-capable :documentFormattingProvider)
(always (eglot-format-buffer))))

View file

@ -280,7 +280,7 @@ mail retrieval/indexing, change the value of ~mu4e-update-interval~:
You will get =No such file or directory, mu4e= errors if you don't run ~$ doom
sync~ after installing =mu= through your package manager.
Some times the the ~mu~ package does not include ~mu4e~ (*cough Ubuntu*). if
Some times the ~mu~ package does not include ~mu4e~ (*cough Ubuntu*). if
that's the case you will need to [[https://github.com/djcb/mu][install]] it and add it to your ~load-path~ you
can do that by:
#+begin_src emacs-lisp

View file

@ -66,7 +66,7 @@ Intended to replace `lisp-outline-level'."
(re-search-backward
"\\_<:\\(?:\\sw\\|\\s_\\)+\\_>" ;; Find a keyword.
doom-start 'noerror))
(unless (looking-back "(")
(unless (looking-back "(" (bol))
(let ((kw-syntax (syntax-ppss)))
(when (and (= (ppss-depth kw-syntax) doom-depth)
(not (ppss-string-terminator kw-syntax))

View file

@ -4,7 +4,7 @@
(defun +latex-indent-item-fn ()
"Indent LaTeX \"itemize\",\"enumerate\", and \"description\" environments.
\"\\item\" is indented `LaTeX-indent-level' spaces relative to the the beginning
\"\\item\" is indented `LaTeX-indent-level' spaces relative to the beginning
of the environment.
See `LaTeX-indent-level-item-continuation' for the indentation strategy this

View file

@ -1368,7 +1368,7 @@ between the two."
#'doom-disable-show-trailing-whitespace-h
;; #'+org-enable-auto-reformat-tables-h
;; #'+org-enable-auto-update-cookies-h
#'+org-make-last-point-visible-h)
)
(add-hook! 'org-load-hook
#'+org-init-org-directory-h
@ -1435,15 +1435,20 @@ between the two."
:references #'+org-lookup-references-handler
:documentation #'+org-lookup-documentation-handler)
(add-hook! 'org-mode-hook
;; HACK: Somehow, users/packages still find a way to modify tab-width in
;; org-mode. Since org-mode treats a non-standerd tab-width as an error
;; state, I use this hook to makes it much harder to change by accident.
(add-hook! 'org-mode-hook
(add-hook! 'after-change-major-mode-hook :local
;; The second check is necessary, in case of `org-edit-src-code' which
;; clones a buffer and changes its major-mode.
(when (derived-mode-p 'org-mode)
(setq tab-width 8))))
(setq tab-width 8)))
;; HACK: `save-place' can position the cursor in an invisible region. This
;; makes it visible unless `org-inhibit-startup' or
;; `org-inhibit-startup-visibility-stuff' is non-nil.
(add-hook 'save-place-after-find-file-hook #'+org-make-last-point-visible-h nil t))
;; Save target buffer after archiving a node.
(setq org-archive-subtree-save-file-p t)

View file

@ -16,13 +16,7 @@
(setq eglot-sync-connect 1
eglot-autoshutdown t
eglot-send-changes-idle-time 0.5
;; NOTE This setting disable the eglot-events-buffer enabling more
;; consistent performance on long running emacs instance.
;; Default is 2000000 lines. After each new event the whole buffer
;; is pretty printed which causes steady performance decrease over time.
;; CPU is spent on pretty priting and Emacs GC is put under high pressure.
eglot-events-buffer-size 0
;; NOTE We disable eglot-auto-display-help-buffer because :select t in
;; NOTE: We disable eglot-auto-display-help-buffer because :select t in
;; its popup rule causes eglot to steal focus too often.
eglot-auto-display-help-buffer nil)
(when (and (modulep! :checkers syntax)
@ -38,7 +32,14 @@
:type-definition #'eglot-find-typeDefinition
:documentation #'+eglot-lookup-documentation)
(add-to-list 'doom-debug-variables '(eglot-events-buffer-size . 2000000))
;; NOTE: This setting disable the eglot-events-buffer enabling more consistent
;; performance on long running emacs instance. Default is 2000000 lines.
;; After each new event the whole buffer is pretty printed which causes
;; steady performance decrease over time. CPU is spent on pretty priting and
;; Emacs GC is put under high pressure.
(cl-callf plist-put eglot-events-buffer-config :size 0)
(add-to-list 'doom-debug-variables '(eglot-events-buffer-config :size 2000000 :format full))
(defadvice! +lsp--defer-server-shutdown-a (fn &optional server)
"Defer server shutdown for a few seconds.

View file

@ -84,6 +84,7 @@ This must be set before `treemacs' has loaded.")
:after treemacs
:config (treemacs-set-scope-type 'Perspectives))
(use-package! lsp-treemacs
:when (modulep! +lsp)
:after (treemacs lsp))
:after treemacs)