65 lines
2.0 KiB
EmacsLisp
65 lines
2.0 KiB
EmacsLisp
;;; init.el --- A (reasonably) minimal initialization file for Emacs.
|
|
|
|
|
|
;; Manage package configuration via `use-package`.
|
|
;; https://github.com/jwiegley/use-package
|
|
|
|
(require 'package)
|
|
(setq package-enable-at-startup nil)
|
|
|
|
(setq package-archives
|
|
'(("gnu" . "https://elpa.gnu.org/packages/")
|
|
("melpa" . "https://melpa.org/packages/")
|
|
("stable" . "https://stable.melpa.org/packages/")))
|
|
|
|
(unless (package-installed-p 'use-package)
|
|
(package-refresh-contents)
|
|
(package-install 'use-package))
|
|
|
|
|
|
;; Define a couple simple helper functions for loading user-defined
|
|
;; configuration files.
|
|
|
|
(defconst user-init-dir "~/.emacs.d/")
|
|
|
|
(defun load-user-file (file)
|
|
(interactive "f")
|
|
"Load a file in the current user's configuration directory"
|
|
(load-file (expand-file-name file user-init-dir)))
|
|
|
|
(defun load-user-dir (dir)
|
|
(interactive "f")
|
|
"Recursively load all files in a given directory, relative to the user's
|
|
configuration directory"
|
|
(setq config-dir (file-name-concat user-init-dir dir))
|
|
(dolist (file (directory-files-recursively config-dir ""))
|
|
(load-user-file file)))
|
|
|
|
|
|
;; Load all user-defined configuration files:
|
|
|
|
(load-user-file "editor.el")
|
|
(load-user-file "interface.el")
|
|
(load-user-file "key-bindings.el")
|
|
(load-user-file "typography.el")
|
|
|
|
(load-user-dir "pkg")
|
|
(load-user-dir "lang")
|
|
|
|
|
|
;; WARNING: Don't touch anything after this comment!
|
|
|
|
(custom-set-variables
|
|
;; custom-set-variables was added by Custom.
|
|
;; If you edit it by hand, you could mess it up, so be careful.
|
|
;; Your init file should contain only one such instance.
|
|
;; If there is more than one, they won't work right.
|
|
'(package-selected-packages
|
|
'(yaml-mode toml-mode markdown-mode yasnippet which-key super-save solaire-mode smartparens rainbow-delimiters magit hl-todo git-gutter flycheck diminish crux)))
|
|
(custom-set-faces
|
|
;; custom-set-faces was added by Custom.
|
|
;; If you edit it by hand, you could mess it up, so be careful.
|
|
;; Your init file should contain only one such instance.
|
|
;; If there is more than one, they won't work right.
|
|
)
|