Move package initialisation to modules
This commit is contained in:
parent
320baafeb3
commit
3ffe11b6e3
36
init.el
36
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 ;;
|
||||
;; ;;
|
||||
;; *********************************************************************** ;;
|
||||
|
||||
|
||||
|
34
modules/editing.el
Normal file
34
modules/editing.el
Normal file
@ -0,0 +1,34 @@
|
||||
;;; editing.el --- Module file for editing configuration.
|
||||
;;
|
||||
;; Copyright (C) 2017 Wojciech Kozlowski
|
||||
;;
|
||||
;; Author: Wojciech Kozlowski <wojciech.kozlowski@vivaldi.net>
|
||||
;; 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")))
|
23
modules/emacs.el
Normal file
23
modules/emacs.el
Normal file
@ -0,0 +1,23 @@
|
||||
;;; emacs.el --- Module file for Emacs management configuration.
|
||||
;;
|
||||
;; Copyright (C) 2017 Wojciech Kozlowski
|
||||
;;
|
||||
;; Author: Wojciech Kozlowski <wojciech.kozlowski@vivaldi.net>
|
||||
;; 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 ())
|
25
modules/version-control.el
Normal file
25
modules/version-control.el
Normal file
@ -0,0 +1,25 @@
|
||||
;;; version-control.el --- Module file for version control configuration.
|
||||
;;
|
||||
;; Copyright (C) 2017 Wojciech Kozlowski
|
||||
;;
|
||||
;; Author: Wojciech Kozlowski <wojciech.kozlowski@vivaldi.net>
|
||||
;; 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))
|
Reference in New Issue
Block a user