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-20 11:40:03 +00:00
|
|
|
|
2021-02-22 22:07:41 +00:00
|
|
|
;; Start the server after init
|
2021-03-09 14:24:07 +00:00
|
|
|
(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
|
|
|
|
2021-02-20 11:40:03 +00:00
|
|
|
;; Bootstrap the straight.el package manager
|
2021-05-12 15:04:24 +00:00
|
|
|
(setq straight-check-for-modifications '(check-on-save find-when-checking)
|
|
|
|
straight-cache-autoloads t)
|
2021-02-20 11:40:03 +00:00
|
|
|
(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))
|
2021-02-20 11:40:03 +00:00
|
|
|
(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)
|
|
|
|
|
2024-05-05 03:05:38 +00:00
|
|
|
(use-package benchmark-init
|
|
|
|
:ensure t
|
|
|
|
:config
|
|
|
|
;; To disable collection of benchmark data after init is done.
|
|
|
|
(add-hook 'after-init-hook 'benchmark-init/deactivate))
|
|
|
|
|
2021-03-19 16:13:43 +00:00
|
|
|
;; "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"
|
2024-02-11 05:12:22 +00:00
|
|
|
"PIPENV_MAX_DEPTH" "PIPENV_VENV_IN_FILE" "PYENV_ROOT"
|
|
|
|
"KOPS_STATE_STORE" "PLAID_CLIENT_ID" "PLAID_SECRET"
|
2024-04-04 00:46:44 +00:00
|
|
|
"PLAID_ENVIRONMENT" "NAVI_PATH" "NAVI_REPOS"))
|
2021-02-24 21:52:34 +00:00
|
|
|
(exec-path-from-shell-check-startup-files nil)
|
|
|
|
(exec-path-from-shell-arguments '("-l")))
|
2021-02-20 19:57:40 +00:00
|
|
|
|
|
|
|
|
2021-02-20 11:40:03 +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)
|
2021-02-20 11:40:03 +00:00
|
|
|
(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)
|
2022-09-06 16:14:28 +00:00
|
|
|
(require 'init-utils)
|
2021-02-20 11:40:03 +00:00
|
|
|
(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)
|
2021-02-20 11:40:03 +00:00
|
|
|
(require 'init-completion)
|
2021-02-20 18:47:46 +00:00
|
|
|
(require 'init-editing)
|
2024-07-20 03:43:47 +00:00
|
|
|
(require 'init-navigation)
|
2021-02-20 11:40:03 +00:00
|
|
|
(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)
|
2021-02-20 23:38:14 +00:00
|
|
|
(require 'init-help)
|
2024-04-10 02:16:43 +00:00
|
|
|
(require 'init-treesit)
|
2021-02-21 03:01:34 +00:00
|
|
|
(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)
|
2024-02-11 05:11:50 +00:00
|
|
|
(require 'init-ruby)
|
2022-04-11 01:12:13 +00:00
|
|
|
(require 'init-rust)
|
2021-04-05 14:44:24 +00:00
|
|
|
(require 'init-web)
|
2024-05-08 17:26:12 +00:00
|
|
|
(require 'init-markdown)
|
2024-04-10 02:16:43 +00:00
|
|
|
(require 'init-astro)
|
2021-04-05 14:45:07 +00:00
|
|
|
(require 'init-xml)
|
2021-02-21 03:01:34 +00:00
|
|
|
(require 'init-yaml)
|
2021-03-08 19:15:57 +00:00
|
|
|
(require 'init-groovy)
|
2024-06-28 17:58:29 +00:00
|
|
|
(require 'init-devdocs)
|
2021-02-21 03:01:34 +00:00
|
|
|
(require 'init-terraform)
|
2021-03-08 19:16:23 +00:00
|
|
|
(require 'init-docker)
|
2024-03-20 16:01:43 +00:00
|
|
|
(require 'init-nix)
|
2023-11-06 18:32:16 +00:00
|
|
|
(require 'init-lua)
|
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)
|
2022-10-05 15:53:37 +00:00
|
|
|
(require 'init-plantuml)
|
2024-04-29 16:25:43 +00:00
|
|
|
(require 'init-mermaid)
|
2024-04-29 20:24:06 +00:00
|
|
|
(require 'init-games)
|
2021-05-12 15:05:04 +00:00
|
|
|
(require 'handwriting)
|
2024-05-03 19:29:31 +00:00
|
|
|
(require 'init-navi)
|
2024-06-05 17:13:57 +00:00
|
|
|
(require 'init-ai)
|
2022-05-31 18:09:33 +00:00
|
|
|
(when (string-equal system-type "darwin")
|
|
|
|
(require 'init-mac))
|
2021-03-03 14:27:34 +00:00
|
|
|
|
2022-04-22 20:59:21 +00:00
|
|
|
(load (expand-file-name (concat user-emacs-directory "local.el")) 'noerror 'nomessage)
|
|
|
|
|
2021-03-03 14:27:34 +00:00
|
|
|
(when (file-exists-p custom-file)
|
|
|
|
(load custom-file 'noerror 'nomessage))
|