nixos/home/emacs/init.el

57 lines
2 KiB
EmacsLisp

;;; 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 (locate-user-emacs-file "custom.el"))
(when (and custom-file (file-exists-p custom-file))
(load custom-file nil 'nomessage))
;; Setup package-archives and priorities
(add-to-list 'package-archives '("stable" . "https://stable.melpa.org/packages/"))
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/"))
(setq package-archive-priorities '(("gnu" . 99)
("nongnu" . 80)
("stable" . 70)
("melpa" . 0)))
(when (require 'package nil :noerror) (package-refresh-contents))
;; Add custom modules to the `load-path'
(add-to-list 'load-path (expand-file-name "modules" user-emacs-directory))
;; Adds crafted-emacs modules to the `load-path'
(setq crafted-emacs-home (expand-file-name "crafted-emacs" user-emacs-directory))
(add-to-list 'load-path (expand-file-name "modules" crafted-emacs-home))
;;; Configuration phase
(setq user-full-name "Evie Litherland-Smith"
user-mail-address "evie@xenia.me.uk")
(require 'custom-defaults-config)
(require 'custom-email-config)
(require 'custom-feed-config)
(require 'custom-ide-config)
(require 'custom-ligatures-config)
(require 'custom-media-config)
(require 'custom-org-config)
(require 'custom-project-config)
(require 'custom-ui-config)
(require 'crafted-completion-config)
(require 'crafted-ide-config)
(require 'crafted-org-config)
(require 'crafted-workspaces-config)
(require 'crafted-writing-config)
;; Set default coding system (especially for Windows)
(set-default-coding-systems 'utf-8)
(set-terminal-coding-system 'utf-8)
(set-keyboard-coding-system 'utf-8)