Drop Emacs 26.x support
Emacs 27.x has been the stable version of Emacs for nearly a year, and
introduces a litany of bugfixes, performance, and quality-of-life
improvements that significantly reduce Doom's maintenance burden (like
XDG support, early-init.el, image manipulation without imagemagick, a
native JSON library, harfbuzz support, pdumper, and others).
With so many big changes on Doom's horizon, I like having one less (big)
thing to worry about.
Also reverts bb677cf7a
(#5232) as it is no longer needed.
This commit is contained in:
parent
ff2d56794e
commit
044a1a5f2b
19 changed files with 58 additions and 326 deletions
|
@ -8,25 +8,20 @@
|
|||
|
||||
(set-popup-rule! "^\\*envrc\\*" :quit t :ttl 0)
|
||||
|
||||
;; I'm avoiding `global-envrc-mode' intentionally, because it has the
|
||||
;; potential to run too late in the mode startup process (and after, say,
|
||||
;; server hooks that may rely on that local direnv environment).
|
||||
(add-hook! 'change-major-mode-after-body-hook
|
||||
(defun +direnv-init-h ()
|
||||
(unless (or envrc-mode
|
||||
(minibufferp)
|
||||
(file-remote-p default-directory))
|
||||
(condition-case _
|
||||
(envrc-mode 1)
|
||||
(quit)))))
|
||||
|
||||
;; Ensure these local variables survive major mode changes, so envrc-mode is
|
||||
;; only "activated" once per buffer.
|
||||
(put 'envrc-mode 'permanent-local t)
|
||||
(put 'envrc--status 'permanent-local t)
|
||||
(put 'process-environment 'permanent-local t)
|
||||
(put 'exec-path 'permanent-local t)
|
||||
(put 'eshell-path-env 'permanent-local t)
|
||||
;; A globalized minor mode triggers on `after-change-major-mode-hook'
|
||||
;; normally, which runs after a major mode's body and hooks. If those hooks do
|
||||
;; any initialization work that's sensitive to environmental state set up by
|
||||
;; direnv, then you're gonna have a bad time, so I move the trigger to
|
||||
;; `change-major-mode-after-body-hook' instead. This runs before said hooks
|
||||
;; (but not the body; fingers crossed that no major mode does important env
|
||||
;; initialization there).
|
||||
(add-hook! 'envrc-global-mode-hook
|
||||
(defun +direnv-init-global-mode-earlier-h ()
|
||||
(let ((fn #'envrc-global-mode-enable-in-buffers))
|
||||
(if (not envrc-global-mode)
|
||||
(remove-hook 'change-major-mode-after-body-hook fn)
|
||||
(remove-hook 'after-change-major-mode-hook fn)
|
||||
(add-hook 'change-major-mode-after-body-hook fn 100)))))
|
||||
|
||||
(defadvice! +direnv--fail-gracefully-a (&rest _)
|
||||
"Don't try to use direnv if the executable isn't present."
|
||||
|
|
|
@ -183,9 +183,9 @@ instead is more sensible."
|
|||
;; and there is a bug preventing Flycheck errors from being shown (the
|
||||
;; errors flash briefly and then disappear).
|
||||
lsp-ui-sideline-show-hover nil
|
||||
;; Some icons don't scale correctly on Emacs 26, so disable them there.
|
||||
lsp-ui-sideline-actions-icon ; DEPRECATED Remove later
|
||||
(if EMACS27+ lsp-ui-sideline-actions-icon-default)
|
||||
;; Re-enable icon scaling (it's disabled by default upstream for Emacs
|
||||
;; 26.x compatibility; see emacs-lsp/lsp-ui#573)
|
||||
lsp-ui-sideline-actions-icon t
|
||||
;; REVIEW Temporarily disabled, due to immense slowness on every
|
||||
;; keypress. See emacs-lsp/lsp-ui#613
|
||||
lsp-ui-doc-enable nil)
|
||||
|
|
|
@ -126,9 +126,7 @@
|
|||
(defadvice! +pdf-suppress-large-file-prompts-a (orig-fn size op-type filename &optional offer-raw)
|
||||
:around #'abort-if-file-too-large
|
||||
(unless (string-match-p "\\.pdf\\'" filename)
|
||||
(if offer-raw
|
||||
(funcall orig-fn size op-type filename offer-raw)
|
||||
(funcall orig-fn size op-type filename)))))
|
||||
(funcall orig-fn size op-type filename offer-raw))))
|
||||
|
||||
|
||||
(use-package! saveplace-pdf-view
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue