diff options
author | Ashton Wiersdorf <ashton.wiersdorf@pobox.com> | 2023-01-02 22:43:41 -0700 |
---|---|---|
committer | Ashton Wiersdorf <ashton.wiersdorf@pobox.com> | 2023-01-02 22:43:41 -0700 |
commit | 453ea93f657d8f64966a2e5bed2d3d0fb48f09ca (patch) | |
tree | 309097df3bb7de2c853fa8ae725907775b67ad4f | |
parent | f7e327261bb4e36100d466efc86fa5513d4e4876 (diff) |
Massive reorganization to early-init.el
-rw-r--r-- | early-init.el | 147 |
1 files changed, 103 insertions, 44 deletions
diff --git a/early-init.el b/early-init.el index d551d82..33b2a4d 100644 --- a/early-init.el +++ b/early-init.el @@ -1,76 +1,135 @@ -;;; Basic settings for speed and convenience +;;; ________ _______ __ __ +;;; / | / \ / | / | +;;; $$$$$$$$/ _____ ____ ______ _______ _______ $$$$$$$ | ______ ____$$ | ______ ______ _______$$ | __ +;;; $$ |__ / \/ \ / \ / |/ | $$ |__$$ |/ \ / $$ |/ \ / \ / $$ | / | +;;; $$ | $$$$$$ $$$$ |$$$$$$ /$$$$$$$//$$$$$$$/ $$ $$</$$$$$$ /$$$$$$$ /$$$$$$ /$$$$$$ /$$$$$$$/$$ |_/$$/ +;;; $$$$$/ $$ | $$ | $$ |/ $$ $$ | $$ \ $$$$$$$ $$ $$ $$ | $$ $$ | $$/$$ | $$ $$ | $$ $$< +;;; $$ |_____$$ | $$ | $$ /$$$$$$$ $$ \_____ $$$$$$ | $$ |__$$ $$$$$$$$/$$ \__$$ $$ | $$ \__$$ $$ \_____$$$$$$ \ +;;; $$ $$ | $$ | $$ $$ $$ $$ / $$/ $$ $$/$$ $$ $$ $$ | $$ $$/$$ $$ | $$ | +;;; $$$$$$$$/$$/ $$/ $$/ $$$$$$$/ $$$$$$$/$$$$$$$/ $$$$$$$/ $$$$$$$/ $$$$$$$/$$/ $$$$$$/ $$$$$$$/$$/ $$/ + + +;;; Contents: +;;; +;;; - Basic settings for quick startup and convenience +;;; - Minibuffer/completion settings +;;; - Interface enhancements/defaults +;;; - Tab-bar configuration +;;; - Theme + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;; +;;; Basic settings for quick startup and convenience +;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;; Startup speed, annoyance sppression (setq gc-cons-threshold 100000000) (setq byte-compile-warnings '(not obsolete)) (setq warning-suppress-log-types '((comp) (bytecomp))) -(setq x-underline-at-descent-line nil) -(setq line-number-mode t) -(setq column-number-mode t) -(setq display-time-default-load-average nil) -(setq inhibit-startup-screen t) -(setq frame-resize-pixelwise t) (setq initial-major-mode 'fundamental-mode) +(setq inhibit-startup-screen t) +(setq display-time-default-load-average nil) + +;; Automatically reread from disk if the underlying file changes (setq auto-revert-interval 3) (setq auto-revert-check-vc-info t) +(global-auto-revert-mode) + +(savehist-mode) + +;; Silence stupid startup message +(setq inhibit-startup-echo-area-message (user-login-name)) + +;; Show the help buffer after startup +(add-hook 'after-init-hook 'help-quick) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;; +;;; Minibuffer/completion settings +;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;; For help, see: https://www.masteringemacs.org/article/understanding-minibuffer-completion + +(setq enable-recursive-minibuffers t) ; Use the minibuffer whilst in the minibuffer +(setq completion-cycle-threshold 1) ; TAB cycles candidates +(setq completions-detailed t) ; Show annotations +(setq tab-always-indent 'complete) ; When I hit TAB, try to complete, otherwise, indent + +(fido-vertical-mode) ; Show completion candidates in a vertical, interactive list +(setq completion-styles '(basic initials substring)) ; Different styles to match input to candidates +(define-key minibuffer-mode-map (kbd "TAB") 'minibuffer-complete) ; TAB acts more like how it does in the shell + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;; +;;; Interface enhancements/defaults +;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;; Mode line information +(setq line-number-mode t) +(setq column-number-mode t) + +(setq x-underline-at-descent-line nil) ; Prettier underlines +(setq frame-resize-pixelwise t) (setq switch-to-buffer-obey-display-actions t) (setq-default show-trailing-whitespace nil) (setq-default indicate-buffer-boundaries 'left) -;; We won't set these, but they're good to know about -;; -;; (setq-default indent-tabs-mode nil) -;; (setq-default tab-width 4) - ;; Enable horizontal scrolling (setq mouse-wheel-tilt-scroll t) (setq mouse-wheel-flip-direction t) -;; Minibuffer/completion -;; https://www.masteringemacs.org/article/understanding-minibuffer-completion -(setq enable-recursive-minibuffers t) -(setq completion-cycle-threshold 1) -(setq completions-detailed t) -(setq tab-always-indent 'complete) -(define-key minibuffer-mode-map (kbd "TAB") 'minibuffer-complete) +;; We won't set these, but they're good to know about +;; +;; (setq-default indent-tabs-mode nil) +;; (setq-default tab-width 4) -;;; Enable/disable various modes +;; Misc. UI tweaks (blink-cursor-mode -1) (tool-bar-mode -1) -(savehist-mode) -(global-auto-revert-mode) (pixel-scroll-precision-mode) (global-hl-line-mode) -;; Silence stupid startup message -(setq inhibit-startup-echo-area-message (user-login-name)) +;; Default frame configuration: full screen, good-looking title bar on macOS +(setq default-frame-alist '((fullscreen . maximized) + (vertical-scroll-bars . nil) + (horizontal-scroll-bars . nil) + (ns-appearance . dark) + (ns-transparent-titlebar . t) + (alpha-background . 50))) -;;; tab-bar config: always show, put time in tab-bar -(setq tab-bar-show 0) ; Always show tab bar +;; Display line numbers in programming mode +(add-hook 'prog-mode-hook 'display-line-numbers-mode) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;; +;;; Tab-bar configuration +;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;; Show the tab-bar as soon as tab-bar functions are invoked +(setq tab-bar-show 0) + +;; Add the time to the tab-bar, if visible (add-to-list 'tab-bar-format 'tab-bar-format-align-right 'append) (add-to-list 'tab-bar-format 'tab-bar-format-global 'append) (setq display-time-format "%a %F %T") (setq display-time-interval 1) (display-time-mode) -;;; Default frame configuration: full screen, good-looking title bar on macOS -(setq default-frame-alist '((fullscreen . maximized) - (vertical-scroll-bars . nil) - (horizontal-scroll-bars . nil) - (ns-appearance . dark) - (ns-transparent-titlebar . t) - (alpha-background . 50))) -;;; Theme -(load-theme 'modus-vivendi) -;; Use this if you like light mode -;(load-theme 'modus-operandi) +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;; +;;; Theme +;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;; Completion -(fido-vertical-mode) -(setq completion-styles '(basic initials substring)) +;; We just use the built-in high contrast theme modus-vivendi +(load-theme 'modus-vivendi) -;;; Line numbers -(add-hook 'prog-mode-hook 'display-line-numbers-mode) +;; If you like light-mode themes instead, use this: -;;; Help buffer -(add-hook 'after-init-hook 'help-quick) +;(load-theme 'modus-operandi) |