diff --git a/init.el b/init.el index e6015cd..1f24462 100644 --- a/init.el +++ b/init.el @@ -62,6 +62,10 @@ ;; *********************************************************************** ;; ;; ;; + ;; MODULES ;; + ;; ;; + ;; ----------------------------------------------------------------------- ;; + ;; ;; ;; ;; ;; Visual configuration must come before this point so that the frame can ;; ;; be set up before any time consuming package management. ;; @@ -71,7 +75,7 @@ ;; -------------------------------------------------------------------------- - ;; Package configuration. + ;; Initialise and setup `package'. ;; -------------------------------------------------------------------------- (require 'package) @@ -79,24 +83,20 @@ '("melpa" . "http://melpa.milkbox.net/packages/") t) (package-initialize) - (load "~/.emacs.d/init-packages/init-packages.el") - (init-packages-init '(use-package - magit - rainbow-delimiters - highlight-parentheses)) + ;; -------------------------------------------------------------------------- + ;; Load `init-packages'. + ;; -------------------------------------------------------------------------- - (use-package magit) + (add-to-list 'load-path "~/.emacs.d/init-packages") + (require 'init-packages) - (use-package rainbow-delimiters) - (add-hook 'prog-mode-hook 'rainbow-delimiters-mode) + ;; -------------------------------------------------------------------------- + ;; Load modules. + ;; -------------------------------------------------------------------------- - (use-package highlight-parentheses) - (add-hook 'prog-mode-hook 'show-paren-mode) - (add-hook 'prog-mode-hook 'highlight-parentheses-mode) - (setq hl-paren-colors '("#86dc2f" - "IndianRed1" - "IndianRed3" - "IndianRed4")) + (init-packages/init '(emacs + version-control + editing)) ;; *********************************************************************** ;; @@ -106,6 +106,10 @@ ;; point so that it does not get overridden by package configuration. ;; ;; ;; ;; ;; + ;; ----------------------------------------------------------------------- ;; + ;; ;; + ;; END MODULES ;; + ;; ;; ;; *********************************************************************** ;; diff --git a/modules/editing.el b/modules/editing.el new file mode 100644 index 0000000..30e03d8 --- /dev/null +++ b/modules/editing.el @@ -0,0 +1,34 @@ +;;; editing.el --- Module file for editing configuration. +;; +;; Copyright (C) 2017 Wojciech Kozlowski +;; +;; Author: Wojciech Kozlowski +;; Created: 25 Aug 2017 +;; +;; This file is not part of GNU Emacs. +;; +;;; Commentary: +;; +;; This module sets up packages and configuration for editing text and code. +;; +;;; License: GPLv3 + +;;; Required packages: + +(setq init-packages/editing-packages + '(rainbow-delimiters + highlight-parentheses)) + +;; Configuration: + +(defun init-packages/init-editing () + (use-package rainbow-delimiters) + (add-hook 'prog-mode-hook 'rainbow-delimiters-mode) + + (use-package highlight-parentheses) + (add-hook 'prog-mode-hook 'show-paren-mode) + (add-hook 'prog-mode-hook 'highlight-parentheses-mode) + (setq hl-paren-colors '("#86DC2F" + "IndianRed1" + "IndianRed3" + "IndianRed4"))) diff --git a/modules/emacs.el b/modules/emacs.el new file mode 100644 index 0000000..439eda7 --- /dev/null +++ b/modules/emacs.el @@ -0,0 +1,23 @@ +;;; emacs.el --- Module file for Emacs management configuration. +;; +;; Copyright (C) 2017 Wojciech Kozlowski +;; +;; Author: Wojciech Kozlowski +;; Created: 25 Aug 2017 +;; +;; This file is not part of GNU Emacs. +;; +;;; Commentary: +;; +;; This module sets up packages and configuration for managing Emacs. +;; +;;; License: GPLv3 + +;;; Required packages: + +(setq init-packages/emacs-packages + '(use-package)) + +;;; Configuration: + +(defun init-packages/init-emacs ()) diff --git a/modules/version-control.el b/modules/version-control.el new file mode 100644 index 0000000..986502c --- /dev/null +++ b/modules/version-control.el @@ -0,0 +1,25 @@ +;;; version-control.el --- Module file for version control configuration. +;; +;; Copyright (C) 2017 Wojciech Kozlowski +;; +;; Author: Wojciech Kozlowski +;; Created: 25 Aug 2017 +;; +;; This file is not part of GNU Emacs. +;; +;;; Commentary: +;; +;; This module sets up configuration for version control packages such as +;; `magit'. +;; +;;; License: GPLv3 + +;;; Required packages: + +(setq init-packages/version-control-packages + '(magit)) + +;;; Configuration: + +(defun init-packages/init-version-control () + (use-package magit))