diff --git a/core/autoload/debug.el b/core/autoload/debug.el index d54256035..6ebf2e2df 100644 --- a/core/autoload/debug.el +++ b/core/autoload/debug.el @@ -100,6 +100,15 @@ ready to be pasted in a bug report on github." "package!")) (error (format "<%S>" e))) '("n/a"))) + (unpin + ,@(or (condition-case e + (mapcan #'identity + (mapcar + #'cdr (doom--collect-forms-in + (doom-path doom-private-dir "packages.el") + "unpin!"))) + (error (format "<%S>" e))) + '("n/a"))) (elpa ,@(or (condition-case e (progn @@ -107,15 +116,7 @@ ready to be pasted in a bug report on github." (cl-loop for (name . _) in package-alist collect (format "%s" name))) (error (format "<%S>" e))) - '("n/a"))) - (unpin ,@(or (condition-case e - (mapcan #'identity - (mapcar - #'cdr (doom--collect-forms-in - (doom-path doom-private-dir "packages.el") - "unpin!"))) - (error (format "<%S>" e))) - '("n/a")))))))) + '("n/a")))))))) ;; @@ -216,7 +217,7 @@ markdown and copies it to your clipboard, ready to be pasted into bug reports!" (prin1-to-string (macroexp-progn (append `((setq noninteractive nil - doom-debug-mode t + init-file-debug t load-path ',load-path package--init-file-ensured t package-user-dir ,package-user-dir diff --git a/modules/config/default/+emacs-bindings.el b/modules/config/default/+emacs-bindings.el index a65bd0642..9d884186a 100644 --- a/modules/config/default/+emacs-bindings.el +++ b/modules/config/default/+emacs-bindings.el @@ -411,7 +411,7 @@ "C-S-h" #'company-show-doc-buffer "C-s" #'company-search-candidates "M-s" #'company-filter-candidates - "" #'company-complete-common-or-cycle + [C-tab] #'company-complete-common-or-cycle [tab] #'company-complete-common-or-cycle [backtab] #'company-select-previous "C-RET" #'counsel-company diff --git a/modules/editor/evil/config.el b/modules/editor/evil/config.el index ffa82f65b..be32ad320 100644 --- a/modules/editor/evil/config.el +++ b/modules/editor/evil/config.el @@ -126,17 +126,26 @@ directives. By default, this only recognizes C directives.") (count-lines (point-min) (point-max)) (buffer-size))))) - ;; '=' moves the cursor to the beginning of selection. Disable this, since - ;; it's more disruptive than helpful. + ;; HACK '=' moves the cursor to the beginning of selection. Disable this, + ;; since it's more disruptive than helpful. (defadvice! +evil--dont-move-cursor-a (orig-fn &rest args) :around #'evil-indent (save-excursion (apply orig-fn args))) - ;; In evil, registers 2-9 are buffer-local. In vim, they're global, so... + ;; REVIEW In evil, registers 2-9 are buffer-local. In vim, they're global, + ;; so... Perhaps this should be PRed upstream? (defadvice! +evil--make-numbered-markers-global-a (char) :after-until #'evil-global-marker-p (and (>= char ?2) (<= char ?9))) + ;; REVIEW Fix #2493: dir-locals cannot target fundamental-mode when evil-mode + ;; is active. See https://github.com/hlissner/doom-emacs/issues/2493. + ;; Revert this if this is ever fixed upstream. + (defadvice! +evil--fix-local-vars-a (&rest _) + :before #'turn-on-evil-mode + (when (eq major-mode 'fundamental-mode) + (hack-local-variables))) + ;; Make ESC (from normal mode) the universal escaper. See `doom-escape-hook'. (advice-add #'evil-force-normal-state :after #'+evil-escape-a) @@ -156,14 +165,6 @@ directives. By default, this only recognizes C directives.") (advice-add #'evil-open-above :around #'+evil--insert-newline-above-and-respect-comments-a) (advice-add #'evil-open-below :around #'+evil--insert-newline-below-and-respect-comments-a) - ;; REVIEW Fix #2493: dir-locals cannot target fundamental-mode when evil-mode - ;; is active. See https://github.com/hlissner/doom-emacs/issues/2493. - ;; Revert this if this is ever fixed upstream. - (defadvice! +evil--fix-local-vars-a (&rest _) - :before #'turn-on-evil-mode - (when (eq major-mode 'fundamental-mode) - (hack-local-variables))) - ;; Recenter screen after most searches (dolist (fn '(evil-visualstar/begin-search-forward evil-visualstar/begin-search-backward @@ -404,11 +405,11 @@ To change these keys see `+evil-repeat-keys'." ;; `evil-collection' (when (featurep! +everywhere) + (setq evil-collection-company-use-tng (featurep! :completion company +tng)) + (unless doom-reloading-p (load! "+everywhere")) - (setq evil-collection-company-use-tng (featurep! :completion company +tng)) - ;; Don't let evil-collection interfere with certain keys (appendq! evil-collection-key-blacklist (append (when (featurep! :tools lookup) diff --git a/modules/editor/fold/config.el b/modules/editor/fold/config.el index 05ab1000f..f72f2fe53 100644 --- a/modules/editor/fold/config.el +++ b/modules/editor/fold/config.el @@ -29,7 +29,7 @@ hs-set-up-overlay #'+fold-hideshow-set-up-overlay-fn) (defadvice! +fold--hideshow-ensure-mode-a (&rest _) - "Ensure `hs-minor-mode' is enabled." + "Ensure `hs-minor-mode' is enabled when we need it, no sooner or later." :before '(hs-toggle-hiding hs-hide-block hs-hide-level hs-show-all hs-hide-all) (unless (bound-and-true-p hs-minor-mode) (hs-minor-mode +1))) diff --git a/modules/lang/clojure/config.el b/modules/lang/clojure/config.el index 55f52738b..a609e93ae 100644 --- a/modules/lang/clojure/config.el +++ b/modules/lang/clojure/config.el @@ -16,8 +16,7 @@ (use-package! cider - ;; NOTE: if you don't have an org directory set (the dir doesn't exist), cider - ;; jack in won't work. + ;; NOTE if `org-directory' doesn't exist, `cider-jack' in won't work :hook (clojure-mode-local-vars . cider-mode) :init (after! clojure-mode diff --git a/modules/lang/common-lisp/config.el b/modules/lang/common-lisp/config.el index 900261c79..a401dd657 100644 --- a/modules/lang/common-lisp/config.el +++ b/modules/lang/common-lisp/config.el @@ -8,19 +8,22 @@ ;; ;; packages +;;;###package lisp-mode (defvar inferior-lisp-program "sbcl") - -(after! lisp-mode - (set-repl-handler! 'lisp-mode #'sly-mrepl) - (set-eval-handler! 'lisp-mode #'sly-eval-region) - (set-lookup-handlers! 'lisp-mode - :definition #'sly-edit-definition - :documentation #'sly-describe-symbol) - - (add-hook 'lisp-mode-hook #'rainbow-delimiters-mode)) +(add-hook 'lisp-mode-hook #'rainbow-delimiters-mode) -(after! sly +(use-package! sly + :defer t + :init + (after! lisp-mode + (set-repl-handler! 'lisp-mode #'sly-mrepl) + (set-eval-handler! 'lisp-mode #'sly-eval-region) + (set-lookup-handlers! 'lisp-mode + :definition #'sly-edit-definition + :documentation #'sly-describe-symbol)) + + :config (setq sly-mrepl-history-file-name (concat doom-cache-dir "sly-mrepl-history") sly-kill-without-query-p t sly-net-coding-system 'utf-8-unix @@ -133,4 +136,4 @@ (use-package! sly-repl-ansi-color :defer t :init - (add-to-list 'sly-contribs 'sly-repl-ansi-color nil #'eq)) + (add-to-list 'sly-contribs 'sly-repl-ansi-color)) diff --git a/modules/lang/org/config.el b/modules/lang/org/config.el index 1db8c52d7..0a9f6df0d 100644 --- a/modules/lang/org/config.el +++ b/modules/lang/org/config.el @@ -52,10 +52,6 @@ Is relative to `org-directory', unless it is absolute. Is used in Doom's default (defvar +org-initial-fold-level 2 "The initial fold level of org files when no #+STARTUP options for it.") -(defvar +org-export-directory ".export/" - "Where to store exported files relative to `org-directory'. Can be an absolute -path too.") - (defvar +org-habit-graph-padding 2 "The padding added to the end of the consistency graph") @@ -238,8 +234,7 @@ path too.") :override #'org-babel-do-load-languages (message (concat "`org-babel-do-load-languages' is redundant with Doom's lazy loading mechanism for babel " - "packages. There is no need to use it, so it has been disabled"))) - ) + "packages. There is no need to use it, so it has been disabled")))) (defun +org-init-capture-defaults-h () diff --git a/modules/ui/vc-gutter/config.el b/modules/ui/vc-gutter/config.el index 0f6ede1f6..1ceb09bc3 100644 --- a/modules/ui/vc-gutter/config.el +++ b/modules/ui/vc-gutter/config.el @@ -11,9 +11,9 @@ diffing, even for unsaved buffers.") (defvar +vc-gutter-default-style t - "If non-nil, enable the default look of the vc gutter. This means subtle thin -bitmaps on the left, an arrow bitmap for flycheck, and flycheck indicators moved -to the right fringe.") + "If non-nil, enable the default look of the vc gutter. +This means subtle thin bitmaps on the left, an arrow bitmap for flycheck, and +flycheck indicators moved to the right fringe.") ;; @@ -58,9 +58,6 @@ is deferred until the file is saved. Respects `git-gutter:disabled-modes'." ;; assigned. I don't know why this is the case, but adding `fundamental-mode' ;; here fixes the issue. (setq git-gutter:disabled-modes '(fundamental-mode image-mode pdf-view-mode)) - - ;; standardize default fringe width - (if (fboundp 'fringe-mode) (fringe-mode '4)) :config (set-popup-rule! "^\\*git-gutter" :select nil :size '+popup-shrink-to-fit) @@ -93,6 +90,9 @@ is deferred until the file is saved. Respects `git-gutter:disabled-modes'." ;; subtle diff indicators in the fringe (when +vc-gutter-default-style + ;; standardize default fringe width + (if (fboundp 'fringe-mode) (fringe-mode '4)) + (after! git-gutter-fringe ;; places the git gutter outside the margins. (setq-default fringes-outside-margins t)