Add starter config for using crafted emacs
This commit is contained in:
parent
c868665bc0
commit
33cb97192d
10
home/emacs/config/early-init.el
Normal file
10
home/emacs/config/early-init.el
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
;;; early-init.el --- Emacs early initialization for Crafted Emacs (optional) -*- lexical-binding: t; -*-
|
||||||
|
;;; Commentary:
|
||||||
|
;;
|
||||||
|
;;; Code:
|
||||||
|
|
||||||
|
;; Configures `package.el'
|
||||||
|
(load "~/Projects/crafted-emacs/modules/crafted-early-init-config")
|
||||||
|
(provide 'early-init)
|
||||||
|
|
||||||
|
;;; early-init.el ends here
|
37
home/emacs/config/init.el
Normal file
37
home/emacs/config/init.el
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
;;; init.el -*- lexical-binding: t; -*-
|
||||||
|
|
||||||
|
;;; Initial phase.
|
||||||
|
|
||||||
|
;; Load the custom file if it exists. Among other settings, this will
|
||||||
|
;; have the list `package-selected-packages', so we need to load that
|
||||||
|
;; before adding more packages. The value of the `custom-file'
|
||||||
|
;; variable must be set appropriately, by default the value is nil.
|
||||||
|
;; This can be done here, or in the early-init.el file.
|
||||||
|
(setq custom-file (expand-file-name "custom.el" user-emacs-directory))
|
||||||
|
(when (and custom-file (file-exists-p custom-file))
|
||||||
|
(load custom-file nil :nomessage))
|
||||||
|
|
||||||
|
;; Adds crafted-emacs modules to the `load-path', sets up a module
|
||||||
|
;; writing template, sets the `crafted-emacs-home' variable.
|
||||||
|
(load "~/Projects/crafted-emacs/modules/crafted-init-config")
|
||||||
|
|
||||||
|
;;; Configuration phase
|
||||||
|
|
||||||
|
;; Some example modules to configure Emacs. Don't blindly copy these,
|
||||||
|
;; they are here for example purposes. Find the modules which work
|
||||||
|
;; for you and add them here.
|
||||||
|
;; (require 'crafted-defaults-config)
|
||||||
|
;; (require 'crafted-startup-config)
|
||||||
|
|
||||||
|
;;; Optional configuration
|
||||||
|
|
||||||
|
;; Profile emacs startup
|
||||||
|
(defun crafted-startup-example/display-startup-time ()
|
||||||
|
"Display the startup time after Emacs is fully initialized."
|
||||||
|
(message "Crafted Emacs loaded in %s."
|
||||||
|
(emacs-init-time)))
|
||||||
|
(add-hook 'emacs-startup-hook #'crafted-startup-example/display-startup-time)
|
||||||
|
|
||||||
|
;; Set default coding system (especially for Windows)
|
||||||
|
(set-default-coding-systems 'utf-8)
|
||||||
|
|
Loading…
Reference in a new issue