-
-
Save wakatara/f6e0c22cde777c29eee8c9d3b1103e4b to your computer and use it in GitHub Desktop.
Daryl's emacs early-init.el for speed optimizations
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; early-init.el --- -*- lexical-binding: t -*- | |
;; Author: Daryl Manning | |
;; Commentary: Modified from Ian Y.E. Pan | |
;; Code: | |
(menu-bar-mode -1) | |
(unless (and (display-graphic-p) (eq system-type 'darwin)) | |
(push '(menu-bar-lines . 0) default-frame-alist)) | |
(push '(tool-bar-lines . 0) default-frame-alist) | |
(push '(vertical-scroll-bars) default-frame-alist) | |
(setq inhibit-startup-screen t) | |
(setq inhibit-startup-echo-area-message t) | |
(setq inhibit-startup-message t) | |
(setq initial-scratch-message nil) | |
(setq initial-major-mode 'org-mode) | |
(setq-default indent-tabs-mode nil) | |
(setq pop-up-windows nil) | |
(tool-bar-mode -1) | |
(tooltip-mode -1) | |
(scroll-bar-mode -1) | |
(defvar file-name-handler-alist-original file-name-handler-alist) | |
(setq gc-cons-threshold most-positive-fixnum | |
gc-cons-percentage 0.6 | |
file-name-handler-alist nil | |
site-run-file nil | |
read-process-output-max (* 10 1024 1024) | |
bidi-inhibit-bpa t) | |
(defvar ian/gc-cons-threshold (* 100 1024 1024)) | |
(add-hook 'emacs-startup-hook ; hook run after loading init files | |
#'(lambda () | |
(setq gc-cons-threshold ian/gc-cons-threshold | |
gc-cons-percentage 0.1 | |
file-name-handler-alist file-name-handler-alist-original))) | |
(add-hook 'minibuffer-setup-hook #'(lambda () | |
(setq gc-cons-threshold most-positive-fixnum))) | |
(add-hook 'minibuffer-exit-hook #'(lambda () | |
(garbage-collect) | |
(setq gc-cons-threshold ian/gc-cons-threshold))) | |
;; Disable package.el in favor of straight.el | |
(setq package-enable-at-startup nil) | |
(provide 'early-init) | |
;;; early-init.el ends here |
Thanks @doolio , I obviously fat-fingered something there. :-) (probs neovim since G puts you at the end of the doc.)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Typo "G" in line 6?