;;; early-init.el --- Early startup code -*- lexical-binding: t -*- ;; Copyright (C) 2021 Ryan C. Thompson ;; Filename: early-init.el ;; Author: Ryan C. Thompson ;; Created: Sat Nov 27 13:40:59 2021 (-0500) ;; This file is NOT part of GNU Emacs. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;;; Commentary: ;; This file contains code that must be executed early during Emacs' ;; startup for proper initialization, as described here: ;; https://www.gnu.org/software/emacs/manual/html_node/emacs/Early-Init-File.html ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;;; Code: ;; Defer garbage collection further back in the startup process (setq gc-cons-threshold most-positive-fixnum) ;; Prevent unwanted runtime compilation for gccemacs (native-comp) users; ;; packages are compiled ahead-of-time when they are installed and site files ;; are compiled when gccemacs is installed. (setq native-comp-deferred-compilation nil ;; obsolete since 29.1 native-comp-jit-compilation nil) ;; 'use-package' is builtin since 29. ;; It must be set before loading 'use-package'. (setq use-package-enable-imenu-support t) ;; In noninteractive sessions, prioritize non-byte-compiled source files to ;; prevent the use of stale byte-code. Otherwise, it saves us a little IO time ;; to skip the mtime checks on every *.elc file. (setq load-prefer-newer noninteractive) ;; Explicitly set the prefered coding systems to avoid annoying prompt ;; from emacs (especially on Microsoft Windows) (prefer-coding-system 'utf-8) ;; Permitir solo la búsqueda de archivos a cargar en la carpeta config case sensitive. (setq auto-mode-case-fold nil) ;; Definimos que la shell por defecto será bash (setq shell-file-name "/bin/bash") ;; Personalizaciones (Tedrían que ir en init-base, pero por optimización, las pongo acá) (push '(menu-bar-lines . 0) default-frame-alist) ; Quitar menús. (push '(tool-bar-lines . 0) default-frame-alist) ; Quitar toolbar. (push '(vertical-scroll-bars) default-frame-alist) (when (featurep 'ns) (push '(ns-transparent-titlebar . t) default-frame-alist)) ;; Prevent flash of unstyled mode line (setq mode-line-format nil) ;; Iniciar emacs maximizado ;; (add-hook 'window-setup-hook 'toggle-frame-maximized t) ; Hacerlo mediante window-setup-hook (se maximiza al terminar de cargar la ventana) ;; (push '(ns-transparent-titlebar . t) default-frame-alist) ;; Resizing the Emacs frame can be a terribly expensive part of changing the ;; font. By inhibiting this, we easily halve startup times with fonts that are ;; larger than the system default. (setq frame-inhibit-implied-resize t frame-resize-pixelwise t) ;; Recommended by ;; https://github.com/raxod502/straight.el#getting-started to prevent ;; pacakge.el stepping on elpaca toes. (setq package-enable-at-startup nil) ;;; early-init.el ends here