-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathearly-init.el
94 lines (72 loc) · 3.24 KB
/
early-init.el
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
;;; early-init.el --- Early Initialization -*- lexical-binding: t; no-byte-compile: t -*-
(setq default-directory "~/")
(setq load-prefer-newer t)
(setq create-lockfiles nil)
(setq ring-bell-function 'ignore)
(setq delete-by-moving-to-trash t)
(setq read-process-output-max (* 1024 1024))
(setq native-comp-async-report-warnings-errors nil)
(setq use-short-answers t) ;; yes-or-no -> y-or-n
(setq package-enable-at-startup nil)
(setq gc-cons-threshold most-positive-fixnum)
(add-hook 'emacs-startup-hook
#'(lambda ()
(let ((init-time (float-time (time-subtract after-init-time before-init-time)))
(packages (length package-activated-list))
(gc-time (float-time gc-elapsed))
(gc-count gcs-done))
(message "Emacs ready (init time = %.2fs, packages = %d, gc time = %.2fs, gc count = %d)."
init-time packages gc-time gc-count))))
(defvar +file-name-handler-alist file-name-handler-alist)
(setq file-name-handler-alist nil)
(add-hook 'emacs-startup-hook
#'(lambda ()
(setq file-name-handler-alist +file-name-handler-alist)))
(setq inhibit-startup-screen t)
(setq inhibit-startup-message t)
(setq initial-scratch-message nil)
(setq frame-inhibit-implied-resize t)
(setq frame-resize-pixelwise t)
(setq window-resize-pixelwise t)
(setq inhibit-compacting-font-caches t)
(setq use-dialog-box nil)
(setq scroll-step 1)
(setq scroll-preserve-screen-position t)
(setq scroll-margin 0)
(setq scroll-conservatively 101)
(setq fast-but-imprecise-scrolling t)
(setq bidi-inhibit-bpa t)
(setq bidi-display-reordering 'left-to-right)
(setq bidi-paragraph-direction 'left-to-right)
(tooltip-mode -1)
(menu-bar-mode -1)
(scroll-bar-mode -1)
(tool-bar-mode -1)
(add-to-list 'default-frame-alist '(left . 0.5))
(add-to-list 'default-frame-alist '(top . 0.5))
(add-to-list 'default-frame-alist '(width . 0.75))
(add-to-list 'default-frame-alist '(height . 0.9))
;; (add-to-list 'default-frame-alist '(menu-bar-lines . 0))
;; (add-to-list 'default-frame-alist '(tool-bar-lines . 0))
;; (add-to-list 'default-frame-alist '(vertical-scroll-bars))
;; (add-to-list 'default-frame-alist '(internal-border-width . 0))
;; (add-to-list 'default-frame-alist '(tabs
;; (current-tab
;; (name . "main")
;; (explicit-name . t))))
;; (setq +font "JetBrains Mono:weight=medium:size=14")
;; (setq +font "Iosevka Term:weight=medium:size=14")
;; (setq +font "Iosevka Term:weight=medium:width=expanded:size=14") ;; Ioesevka Term Extended
;; (setq +font "Martian Mono Condensed 14")
(setq +font "Cascadia Code:size=16")
;; (setq +font "Cascadia Code NF:size=16")
(add-to-list 'default-frame-alist `(font . ,+font))
(when (featurep 'ns)
(setq ns-use-proxy-icon nil)
(setq frame-title-format nil)
(add-to-list 'default-frame-alist '(undecorated-round . t))
(add-to-list 'default-frame-alist '(ns-transparent-titlebar . t))
(add-to-list 'default-frame-alist '(ns-appearance . dark)))
;; (setq custom-file null-device)
;; Fix: Error in post-command-hook (vertico--exhibit): (error "Maximum buffer size exceeded")
(setq custom-file (locate-user-emacs-file "custom.el"))