;;; init --- Initialization file for Emacs  -*- mode: emacs-lisp; lexical-binding: t -*-

;;; Commentary:
;; Emacs Startup File --- initialization for Emacs
;; https://blog.d46.us/advanced-emacs-startup/

;; Usage:
;; "emacs --init-directory ~/repos/emacs-conf"
;; "emacs --no-splash -q -l ~/repos/emacs-conf/init"

;; Requirements: git gnuplot ledger

;;; Code:
(require 'early-init
         (concat
          (file-name-directory (file-truename (or load-file-name
                                                  "~/.config/emacs/init")))
          "early-init.el")
         t)
;;  Load early-init-el if not already
;;  - Emacs 27.1 introduced early-init.el, which is run before
;;    init.el, before package and UI initialization happens, and
;;    before site files are loaded.  In the case that early-init.el
;;    wasn't loaded (e.g. using old emacs? Or this file directly
;;    loaded?), we do it explicitly
;;  - for org export async actions, e.g. as in
;;    emacs -l ~/.config/emacs/init -l /tmp/org-export-processXYZ
(require 'pre-settings)                            ;; use-package delight functions variables
(require 'which-key-settings)                      ;; https://melpa.org/#/which-key
(require 'general-settings)                        ;; requires which-key
(require 'my-settings)
(require 'gui-settings)                            ;; emacs modeline indent rainbow focus dashboard
(require 'theme-settings)                          ;; spacemacs-theme fonts emojify
(require 'popwin-settings)                         ;; https://melpa.org/#/popwin
(require 'toolbar-settings)
(require 'deft-settings)                           ;; https://melpa.org/#/deft
(require 'completion-settings)                     ;; requires ivy counsel company yasnippet popup amx, see also semantic
(require 'cedet-settings)                          ;; requires srefactor stickyfunc-enhance
(require 'spell-settings)                          ;; requires langtool (languagetool)
(require 'syntax-checking-settings)                ;; requires flycheck
(require 'bibliography-settings)                   ;; requires org-ref ivy-bibtex ox-bibtex (org contrib)
(require 'version-control-settings)                ;; requires magit git-messenger orgit diff-hl
(require 'treemacs-settings)                       ;; requires treemacs treemacs-magit s f ht ace-window avy pfuture hydra
(require 'org-settings)                            ;; requires htmlize ox-tufte ox-extra gnuplot (src block) ob-async org-superstar org-sticky-header org-drill
(require 'multiple-cursors-settings)
;;(require 'eaf-settings)
(require 'mail-settings)

;; languages / filetypes
(require 'plot-settings)                           ;; gnuplot-mode plantuml-mode (dash)
(require 'ess-settings)                            ;; requires ess ess-R-data-view ctable popup
(require 'ledger-settings)                         ;; ledger-mode company-ledger
(require 'python-settings)                         ;; requires anaconda-mode pythonic company-anaconda
(require 'shell-settings)                          ;; sh-script powershell
(require 'web-settings)                            ;; css js2 php web-mode company-web
(require 'filetype-settings)                       ;; markdown sql systemd
(require 'dot-settings)                            ;; graphviz dot
(require 'polymode-settings)                       ;; polymode

(require 'post-settings)
;;; init ends here
