Refactor doom-debug-mode

+ Add explain-pause-mode
+ Now reloads itself if doom-debug-variables is changed or when one of
  its variables becomes available.
+ doom-debug-variables now supports a cons cell entry where its CAR is
  the name of the variable and CDR is the value it should be set to when
  doom-debug-mode is active.
This commit is contained in:
Henrik Lissner 2020-08-21 00:09:59 -04:00
parent 70148bbfc8
commit 4e82ee4397
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
6 changed files with 61 additions and 14 deletions

View file

@ -1,7 +1,5 @@
;;; tools/lsp/+eglot.el -*- lexical-binding: t; -*-
;; TODO set eglot-events-buffer-size to nil in doom-debug-mode
(use-package! eglot
:commands eglot eglot-ensure
:hook (eglot-managed-mode . +lsp-init-optimizations-h)
@ -20,6 +18,9 @@
:implementations #'eglot-find-implementation
:type-definition #'eglot-find-typeDefinition
:documentation #'+eglot-lookup-documentation)
(add-to-list 'doom-debug-variables '(eglot-events-buffer-size . 0))
(when (featurep! :checkers syntax)
(after! flycheck
(load! "autoload/flycheck-eglot")))

View file

@ -44,6 +44,8 @@ should be a deliberate act (as is flipping this variable).")
lsp-enable-on-type-formatting nil)
:config
(pushnew! doom-debug-variables 'lsp-log-io 'lsp-print-performance)
(setq lsp-intelephense-storage-path (concat doom-cache-dir "lsp-intelephense/")
lsp-vetur-global-snippets-dir (expand-file-name "vetur"
(or (bound-and-true-p +snippets-dir)

View file

@ -18,6 +18,8 @@ For example, diffs and log buffers. Accepts `left', `right', `up', and `down'.")
transient-values-file (concat doom-etc-dir "transient/values")
transient-history-file (concat doom-etc-dir "transient/history"))
:config
(add-to-list 'doom-debug-variables 'magit-refresh-verbose)
(setq transient-default-level 5
magit-diff-refine-hunk t ; show granular diffs in selected hunk
;; Don't autosave repo buffers. This is too magical, and saving can