all repos — nixfiles @ 9958179f026bf5e604d16c8b6188a95fd422de2a

System and user configuration, managed by nix and home-manager

Emacs: move relevant config to early-init

Alan Pearce
commit

9958179f026bf5e604d16c8b6188a95fd422de2a

parent

3937dbd373054643862bed55e11280d2f34b6eeb

3 files changed, 20 insertions(+), 13 deletions(-)

jump to
A user/emacs/early-init.el
@@ -0,0 +1,14 @@
+(setq inhibit-startup-screen t + initial-scratch-message "" + initial-major-mode 'fundamental-mode + package-enable-at-startup nil + frame-inhibit-implied-resize t) + +;; Disable all the bars, unless on OSX, in which case, keep the menu bar. +(unless (eq system-type 'darwin) + (menu-bar-mode -1)) +(scroll-bar-mode -1) +(tool-bar-mode -1) +(set-fringe-mode '(4 . 4)) + +(defvar evil-want-keybinding nil)
M user/emacs/init.eluser/emacs/init.el
@@ -1,12 +1,5 @@
;;; init --- user init file -*- lexical-binding: t; -*- (setq inhibit-startup-echo-area-message "alan") -(setq inhibit-startup-screen t - initial-scratch-message "" - initial-major-mode 'fundamental-mode - package-enable-at-startup nil - evil-want-keybinding nil - frame-inhibit-implied-resize t) - (let ((default-gc-cons-threshold (* 16 1024 1024)) (default-file-name-handler-alist file-name-handler-alist)) (setq gc-cons-threshold most-positive-fixnum
@@ -60,12 +53,6 @@ ;;; Styles
;; I prefer an always-visible cursor. Feels less distracting. (blink-cursor-mode -1) -;; Disable all the bars, unless on OSX, in which case, keep the menu bar. -(unless (eq system-type 'darwin) - (menu-bar-mode -1)) -(scroll-bar-mode -1) -(tool-bar-mode -1) -(set-fringe-mode '(4 . 4)) ;; Ring the bell sometimes, but not so often (setq ring-bell-function
M user/settings/emacs.nixuser/settings/emacs.nix
@@ -189,6 +189,12 @@ ];
home.sessionVariables = { EDITOR = "${editorScript}/bin/edit"; }; + xdg.configFile."emacs/early-init.el" = { + source = ../emacs/early-init.el; + onChange = '' + ${config.programs.emacs.finalPackage}/bin/emacs -Q -batch -f batch-byte-compile .config/emacs/early-init.el + ''; + }; xdg.configFile."emacs/init.el" = { source = ../emacs/init.el; onChange = ''