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

119 lines
3.4 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
(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)))
2021-02-22 22:07:41 +00:00
;; Start the server after init
(autoload 'server-running-p "server")
(defun server-start-if-not-running ()
(unless (server-running-p)
(server-start)))
(add-hook 'emacs-startup-hook #'server-start-if-not-running)
2021-02-22 22:07:41 +00:00
;; Bootstrap the straight.el package manager
(setq straight-check-for-modifications '(check-on-save find-when-checking)
straight-cache-autoloads t)
(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)
;; "Garbage Collection Magic Hack"
(use-package gcmh
:demand t
:config
(gcmh-mode 1))
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
2022-03-30 14:13:42 +00:00
'("PATH" "MANPATH" "INFOPATH" "LEDGER_FILE"
"WORKON_HOME" "PIPENV_VERBOSITY" "PIPENV_DONT_LOAD_ENV"
2021-02-20 23:38:02 +00:00
"PIPENV_MAX_DEPTH" "PYENV_ROOT" "KOPS_STATE_STORE"
"PLAID_CLIENT_ID" "PLAID_SECRET" "PLAID_ENVIRONMENT"))
(exec-path-from-shell-check-startup-files nil)
(exec-path-from-shell-arguments '("-l")))
2021-02-20 19:57:40 +00:00
;; 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-04-05 14:43:20 +00:00
(require 'init-elisp)
2021-02-23 16:09:07 +00:00
(require 'init-org)
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)
2021-03-08 19:16:13 +00:00
(require 'init-lisp)
2022-03-30 16:26:58 +00:00
(require 'init-java)
2021-10-05 15:08:42 +00:00
(require 'init-scala)
2021-02-26 15:28:33 +00:00
(require 'init-js)
2022-04-11 01:12:13 +00:00
(require 'init-rust)
2021-04-05 14:44:24 +00:00
(require 'init-web)
2021-04-05 14:45:07 +00:00
(require 'init-xml)
(require 'init-yaml)
2021-03-08 19:15:57 +00:00
(require 'init-groovy)
(require 'init-terraform)
2021-03-08 19:16:23 +00:00
(require 'init-docker)
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)
2021-02-27 04:55:06 +00:00
(require 'init-kubernetes)
2021-03-02 02:17:20 +00:00
(require 'init-epub)
2021-05-12 15:04:55 +00:00
(require 'init-pdf)
2021-03-03 14:27:44 +00:00
(require 'init-homebrew)
2021-03-09 14:24:18 +00:00
(require 'init-elfeed)
2021-03-23 17:46:55 +00:00
(require 'init-1pass)
2021-04-15 19:26:38 +00:00
(require 'init-wallabag)
2021-03-23 17:46:55 +00:00
(require 'init-lola)
2021-05-12 15:05:04 +00:00
(require 'handwriting)
2021-03-03 14:27:34 +00:00
(when (file-exists-p custom-file)
(load custom-file 'noerror 'nomessage))