.emacs.d/early-init.el

28 lines
1,015 B
EmacsLisp
Raw Normal View History

;;; EMACS early-init file -*- lexical-binding:t -*-
;; Manual implementation of gcmh as soon as possible (stolen from lambda emacs)
(setq gc-cons-threshold (* 300 1024 1024)) ; 300 MB
(defmacro k-time (&rest body)
"Measure and return the time it takes evaluating BODY."
`(let ((time (current-time)))
,@body
(float-time (time-since time))))
;; 15 sec gc loop when idle
(run-with-idle-timer 15 t
(lambda ()
(let ((inhibit-message t))
(message "Garbage Collector ran for %.06fsec"
(k-time (garbage-collect))))))
;; Set frame parameters early
(setq default-frame-alist '((font . "JetbrainsMono Nerd Font-11")
(tool-bar-lines . 0)
(menu-bar-lines . 0)
(vertical-scroll-bars . nil)))
;; Annoyoing comp errors
(setq native-comp-async-report-warnings-errors 'silent)
2023-02-18 22:07:57 -08:00
;; Annoying dialog boxes
(setq use-dialog-box nil)