2021-03-08 04:14:38 +00:00
|
|
|
;;; early-init.el -*- lexical-binding: t; coding: utf-8-unix -*-
|
2021-11-22 05:57:41 +00:00
|
|
|
|
|
|
|
;; Author: Case Duckworth <acdw@acdw.net>
|
2021-03-01 05:58:57 +00:00
|
|
|
;; Created: Sometime during Covid-19, 2020
|
2021-02-26 17:31:50 +00:00
|
|
|
;; Keywords: configuration
|
2021-03-08 04:14:38 +00:00
|
|
|
;; URL: https://tildegit.org/acdw/emacs
|
2021-03-16 16:16:21 +00:00
|
|
|
|
2021-03-01 05:58:57 +00:00
|
|
|
;;; License:
|
2021-11-22 05:57:41 +00:00
|
|
|
|
|
|
|
;; Everyone is permitted to do whatever they like with this software
|
|
|
|
;; without limitation. This software comes without any warranty
|
|
|
|
;; whatsoever, but with two pieces of advice:
|
|
|
|
;; - Be kind to yourself.
|
2021-03-01 05:58:57 +00:00
|
|
|
;; - Make good choices.
|
2021-03-16 16:16:21 +00:00
|
|
|
|
2021-11-22 05:57:41 +00:00
|
|
|
;;; Commentary:
|
|
|
|
|
|
|
|
;; Starting with Emacs 27.1, early-init.el is sourced before
|
|
|
|
;; package.el and any graphical frames. In this file, I set up frame
|
|
|
|
;; parameters and packaging infrastructure.
|
2021-03-16 16:16:21 +00:00
|
|
|
|
2021-03-01 05:58:57 +00:00
|
|
|
;;; Code:
|
2021-02-26 17:31:50 +00:00
|
|
|
|
2021-12-29 04:14:21 +00:00
|
|
|
;; Message when loading a library. This is the only place I'm going to use a
|
|
|
|
;; `defadvice', and only because it's cleaner than defining a nonce function.
|
|
|
|
(defadvice load (before debug-log activate)
|
|
|
|
(message "Now loading: '%s'" (ad-get-arg 0)))
|
|
|
|
|
2021-11-22 05:57:41 +00:00
|
|
|
(push (locate-user-emacs-file "lisp") load-path)
|
|
|
|
(add-to-list 'load-path (locate-user-emacs-file "lisp/compat") :append)
|
|
|
|
|
2021-03-25 17:02:28 +00:00
|
|
|
(require 'acdw)
|
2021-11-22 05:57:41 +00:00
|
|
|
|
|
|
|
(+define-dir .etc (locate-user-emacs-file ".etc")
|
|
|
|
"Directory for all of Emacs's various files.
|
|
|
|
See `no-littering' for examples.")
|
|
|
|
|
|
|
|
(+define-dir sync/ (expand-file-name "~/Sync")
|
|
|
|
"My Syncthing directory.")
|
|
|
|
|
|
|
|
;;; Default frame settings
|
|
|
|
|
|
|
|
(setq default-frame-alist '((tool-bar-lines . 0)
|
|
|
|
(menu-bar-lines . 0)
|
|
|
|
(vertical-scroll-bars)
|
|
|
|
(horizontal-scroll-bars))
|
2021-09-25 18:16:09 +00:00
|
|
|
frame-inhibit-implied-resize t
|
2021-11-22 05:57:41 +00:00
|
|
|
frame-resize-pixelwise t
|
|
|
|
window-resize-pixelwise t
|
|
|
|
inhibit-x-resources t
|
|
|
|
indicate-empty-lines nil
|
|
|
|
indicate-buffer-boundaries '((top . right)
|
|
|
|
(bottom . right)))
|
|
|
|
|
|
|
|
;; Fonts
|
|
|
|
(let ((font-name "Go Mono")
|
2021-12-29 04:14:21 +00:00
|
|
|
(font-size 105)
|
2021-12-29 00:18:51 +00:00
|
|
|
(variable-font-name "Go")
|
|
|
|
(variable-font-size 1.0))
|
2021-11-22 05:57:41 +00:00
|
|
|
(set-face-attribute 'default nil :family font-name
|
|
|
|
:height font-size :weight 'book)
|
|
|
|
(set-face-attribute 'italic nil :family font-name
|
2021-12-29 00:18:51 +00:00
|
|
|
:height font-size :slant 'italic)
|
|
|
|
(set-face-attribute 'variable-pitch nil :family variable-font-name
|
|
|
|
:height variable-font-size))
|
2021-11-22 05:57:41 +00:00
|
|
|
|
|
|
|
;;; Packages
|
|
|
|
|
2021-03-29 22:52:23 +00:00
|
|
|
(setq package-enable-at-startup nil
|
|
|
|
package-quickstart nil
|
2021-03-08 04:14:38 +00:00
|
|
|
straight-host-usernames '((github . "duckwork")
|
2021-11-22 05:57:41 +00:00
|
|
|
(gitlab . "acdw"))
|
|
|
|
straight-check-for-modifications '(check-on-save
|
|
|
|
find-when-checking))
|
|
|
|
|
|
|
|
(setq no-littering-etc-directory .etc
|
|
|
|
no-littering-var-directory .etc
|
|
|
|
straight-base-dir .etc)
|
|
|
|
|
|
|
|
;; Bootstrap straight.el
|
|
|
|
;; https://github.com/raxod502/straight.el
|
2021-03-01 05:58:57 +00:00
|
|
|
|
2021-03-01 18:12:48 +00:00
|
|
|
(defvar bootstrap-version)
|
|
|
|
(let ((bootstrap-file
|
|
|
|
(expand-file-name
|
2021-03-29 22:52:23 +00:00
|
|
|
"straight/repos/straight.el/bootstrap.el"
|
|
|
|
straight-base-dir))
|
2021-03-01 18:12:48 +00:00
|
|
|
(bootstrap-version 5))
|
|
|
|
(unless (file-exists-p bootstrap-file)
|
|
|
|
(with-current-buffer
|
2021-03-29 22:52:23 +00:00
|
|
|
(url-retrieve-synchronously
|
|
|
|
(concat "https://raw.githubusercontent.com/"
|
|
|
|
"raxod502/straight.el/develop/install.el")
|
|
|
|
'silent 'inhibit-cookies)
|
2021-03-01 18:12:48 +00:00
|
|
|
(goto-char (point-max))
|
|
|
|
(eval-print-last-sexp)))
|
|
|
|
(load bootstrap-file nil 'nomessage))
|
2021-04-09 22:51:10 +00:00
|
|
|
|
2021-11-22 05:57:41 +00:00
|
|
|
;; Early-loaded packages -- those that, for some reason or another,
|
|
|
|
;; need to be ensured to be loaded first.
|
|
|
|
|
2021-08-07 02:26:02 +00:00
|
|
|
(require 'straight-x)
|
|
|
|
|
2021-11-22 05:57:41 +00:00
|
|
|
(dolist (pkg '(el-patch
|
|
|
|
no-littering
|
|
|
|
setup))
|
|
|
|
(straight-use-package pkg)
|
|
|
|
(require pkg)
|
|
|
|
(require (intern (format "+%s" pkg)) nil :noerror))
|
2021-04-22 22:58:43 +00:00
|
|
|
|
2021-11-22 05:57:41 +00:00
|
|
|
;;; Appendix
|
2021-10-09 14:18:35 +00:00
|
|
|
|
2021-11-22 05:57:41 +00:00
|
|
|
;; I've patched setup to look at `setup-ensure-function-inhibit' to decide
|
|
|
|
;; whether to ensure functions or not with local macros.
|
|
|
|
(setq setup-ensure-function-inhibit t)
|
|
|
|
|
|
|
|
;; Get rid of a dumb alias. straight-ಠ_ಠ-mode really slows down all
|
|
|
|
;; minibuffer completion functions. Since it's a (rarely-used, even)
|
|
|
|
;; alias anyway, I just define it back to nil. By the way, the alias
|
|
|
|
;; is `straight-package-neutering-mode'.
|
|
|
|
(defalias 'straight-ಠ_ಠ-mode nil)
|
|
|
|
|
|
|
|
(provide 'early-init)
|
2021-08-21 14:10:01 +00:00
|
|
|
;;; early-init.el ends here
|
2021-11-22 05:57:41 +00:00
|
|
|
|