dotfiles/emacs/.emacs.d/init.el

87 lines
2.6 KiB
EmacsLisp
Raw Normal View History

2021-02-21 02:59:29 +00:00
;; -*- lexical-binding: t; -*-
;; Some startup time optimizations stolen from Doom emacs
(setq gc-cons-threshold most-positive-fixnum ; 2^61 bytes
gc-cons-percentage 0.6)
(defvar file-name-handler-alist-backup file-name-handler-alist)
(setq file-name-handler-alist nil)
(add-hook 'emacs-startup-hook
(lambda ()
(setq gc-cons-threshold 16777216 ; 16mb
gc-cons-percentage 0.1
file-name-handler-alist file-name-handler-alist-backup)))
;; Bootstrap the straight.el package manager
(defvar bootstrap-version)
(let ((bootstrap-file
2021-02-21 03:00:11 +00:00
(expand-file-name "straight/repos/straight.el/bootstrap.el"
user-emacs-directory))
(bootstrap-version 5))
(unless (file-exists-p bootstrap-file)
(with-current-buffer
(url-retrieve-synchronously
"https://raw.githubusercontent.com/raxod502/straight.el/develop/install.el"
'silent 'inhibit-cookies)
(goto-char (point-max))
(eval-print-last-sexp)))
(load bootstrap-file nil 'nomessage))
;; Load up use-package for subsequent configuration
(straight-use-package 'use-package)
(setq straight-use-package-by-default t)
2021-02-20 19:57:40 +00:00
;; Fix $PATH
(use-package exec-path-from-shell
:hook (after-init . exec-path-from-shell-initialize)
:custom
2021-02-20 23:38:02 +00:00
(exec-path-from-shell-variables
'("PATH" "MANPATH" "LEDGER_FILE" "LOLA_HOME"
"MODELS_HOME" "LOLA_TRAVEL_SERVICE_HOME" "WORKON_HOME"
"PIPENV_VERBOSITY" "PIPENV_DONT_LOAD_ENV"
"PIPENV_MAX_DEPTH" "PYENV_ROOT" "KOPS_STATE_STORE"
"PLAID_CLIENT_ID" "PLAID_SECRET" "PLAID_ENVIRONMENT"))
2021-02-20 19:57:40 +00:00
(exec-path-from-shell-check-startup-files nil))
;; Don't use this file as the custom-file
(setq custom-file (expand-file-name "custom.el" user-emacs-directory))
;; Load config modules
(add-to-list 'load-path (expand-file-name "config" user-emacs-directory))
(require 'init-defaults)
2021-02-20 19:58:09 +00:00
(require 'init-undo)
(require 'init-evil)
(require 'init-keybindings)
2021-02-20 16:12:47 +00:00
(require 'init-auth)
2021-02-21 03:00:23 +00:00
(require 'init-lib)
2021-02-20 16:52:15 +00:00
(require 'init-profiler)
2021-02-20 23:23:42 +00:00
(require 'init-built-ins)
(require 'init-dashboard)
(require 'init-dotfiles)
(require 'init-buffers)
(require 'init-files)
(require 'init-windows)
2021-02-20 16:52:15 +00:00
(require 'init-dired)
(require 'init-completion)
2021-02-20 18:47:46 +00:00
(require 'init-editing)
(require 'init-ui)
(require 'init-projects)
(require 'init-git)
2021-02-20 19:57:40 +00:00
(require 'init-ide)
2021-02-21 13:20:05 +00:00
(require 'init-vterm)
2021-02-20 19:58:31 +00:00
(require 'init-eshell)
(require 'init-help)
(require 'init-python)
(require 'init-clojure)
(require 'init-yaml)
(require 'init-terraform)
2021-02-21 03:01:52 +00:00
(require 'init-run-command)
2021-02-21 03:02:19 +00:00
(require 'init-aws)
2021-02-21 13:20:46 +00:00
(require 'init-prodigy)
2021-02-21 13:40:47 +00:00
(require 'init-direnv)
2021-02-21 14:23:49 +00:00
(require 'init-email)
;; Load the custom file
(when (file-exists-p custom-file)
(load custom-file))