refactor(lsp): remove emacs 26 workarounds
This commit is contained in:
parent
64b0e42260
commit
258104f750
1 changed files with 7 additions and 13 deletions
|
@ -26,20 +26,14 @@ killing and opening many LSP/eglot-powered buffers.")
|
||||||
+lsp--optimization-init-p nil)
|
+lsp--optimization-init-p nil)
|
||||||
;; Only apply these settings once!
|
;; Only apply these settings once!
|
||||||
(unless +lsp--optimization-init-p
|
(unless +lsp--optimization-init-p
|
||||||
(setq +lsp--default-read-process-output-max
|
(setq +lsp--default-read-process-output-max (default-value 'read-process-output-max)
|
||||||
;; DEPRECATED Remove check when 26 support is dropped
|
+lsp--default-gcmh-high-cons-threshold (default-value 'gcmh-high-cons-threshold))
|
||||||
(if (boundp 'read-process-output-max)
|
|
||||||
(default-value 'read-process-output-max))
|
|
||||||
+lsp--default-gcmh-high-cons-threshold
|
|
||||||
(default-value 'gcmh-high-cons-threshold))
|
|
||||||
;; `read-process-output-max' is only available on recent development
|
|
||||||
;; builds of Emacs 27 and above.
|
|
||||||
(setq-default read-process-output-max (* 1024 1024))
|
(setq-default read-process-output-max (* 1024 1024))
|
||||||
;; REVIEW LSP causes a lot of allocations, with or without Emacs 27+'s
|
;; REVIEW LSP causes a lot of allocations, with or without the native JSON
|
||||||
;; native JSON library, so we up the GC threshold to stave off
|
;; library, so we up the GC threshold to stave off GC-induced
|
||||||
;; GC-induced slowdowns/freezes. Doom uses `gcmh' to enforce its
|
;; slowdowns/freezes. Doom uses `gcmh' to enforce its GC strategy,
|
||||||
;; GC strategy, so we modify its variables rather than
|
;; so we modify its variables rather than `gc-cons-threshold'
|
||||||
;; `gc-cons-threshold' directly.
|
;; directly.
|
||||||
(setq-default gcmh-high-cons-threshold (* 2 +lsp--default-gcmh-high-cons-threshold))
|
(setq-default gcmh-high-cons-threshold (* 2 +lsp--default-gcmh-high-cons-threshold))
|
||||||
(gcmh-set-high-threshold)
|
(gcmh-set-high-threshold)
|
||||||
(setq +lsp--optimization-init-p t))))
|
(setq +lsp--optimization-init-p t))))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue