2017-08-17 20:37:33 +01:00
|
|
|
;;; init.el --- Emacs Initialization File
|
|
|
|
;;
|
|
|
|
;; Copyright (c) 2017 Wojciech Kozlowski
|
|
|
|
;;
|
|
|
|
;; Author: Wojciech Kozlowski <wojciech.kozlowski@vivaldi.net>
|
|
|
|
;; URL: https://gitlab.wojciechkozlowski.eu/config/emacs.d
|
2017-08-26 00:04:38 +01:00
|
|
|
;; Created: 17 Aug 2017
|
2017-08-17 20:37:33 +01:00
|
|
|
;;
|
|
|
|
;;; License: GPLv3
|
2017-08-17 20:38:30 +01:00
|
|
|
|
|
|
|
;; ----------------------------------------------------------------------------
|
|
|
|
;; Run init without garbage collection.
|
|
|
|
;; ----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
(let ((gc-cons-threshold most-positive-fixnum))
|
|
|
|
|
2017-08-17 20:39:43 +01:00
|
|
|
;; --------------------------------------------------------------------------
|
|
|
|
;; Visual configuration.
|
|
|
|
;; --------------------------------------------------------------------------
|
|
|
|
|
2017-08-17 22:41:32 +01:00
|
|
|
;; Font ---------------------------------------------------------------------
|
|
|
|
|
2017-08-19 03:03:34 +01:00
|
|
|
(let* ((font-name "Source Code Pro")
|
|
|
|
(font-size 10)
|
|
|
|
(font-spec (concat font-name "-" (int-to-string font-size))))
|
|
|
|
|
|
|
|
(set-frame-font font-spec nil t)
|
|
|
|
(add-to-list 'default-frame-alist `(font . ,font-spec))
|
|
|
|
(set-face-attribute 'italic nil ;; Emacs does not set italic face
|
|
|
|
:family (concat font-name "-Italic")))
|
2017-08-17 22:41:32 +01:00
|
|
|
|
2017-08-17 20:39:43 +01:00
|
|
|
;; Fullscreen ---------------------------------------------------------------
|
|
|
|
|
2017-08-18 22:27:38 +01:00
|
|
|
(toggle-frame-maximized)
|
2017-08-17 20:39:43 +01:00
|
|
|
(add-to-list 'default-frame-alist '(fullscreen . maximized))
|
|
|
|
|
|
|
|
;; Visual clutter -----------------------------------------------------------
|
|
|
|
|
|
|
|
(scroll-bar-mode -1)
|
|
|
|
(tool-bar-mode -1)
|
|
|
|
(menu-bar-mode -1)
|
2017-08-18 22:27:38 +01:00
|
|
|
(blink-cursor-mode -1)
|
2017-08-17 20:39:43 +01:00
|
|
|
|
2017-08-27 23:25:14 +01:00
|
|
|
;; Modeline -----------------------------------------------------------------
|
|
|
|
|
|
|
|
(size-indication-mode 1)
|
|
|
|
(column-number-mode 1)
|
|
|
|
|
2017-08-17 22:41:32 +01:00
|
|
|
;; Theme --------------------------------------------------------------------
|
|
|
|
|
2017-08-27 15:47:40 +01:00
|
|
|
;; Add the necessary paths.
|
2017-08-27 15:07:18 +01:00
|
|
|
(add-to-list 'load-path "~/.emacs.d/themes/")
|
2017-08-24 22:01:08 +01:00
|
|
|
(add-to-list 'custom-theme-load-path "~/.emacs.d/themes/")
|
2017-08-27 15:47:40 +01:00
|
|
|
|
|
|
|
;; Load the dark theme by default.
|
2017-08-27 15:07:18 +01:00
|
|
|
(load-theme 'havoc-dark t) ;; Load personal theme
|
2017-08-17 22:41:32 +01:00
|
|
|
|
2017-08-24 22:41:18 +01:00
|
|
|
;; --------------------------------------------------------------------------
|
|
|
|
;; Change file in which custom variable changes are saved.
|
|
|
|
;; --------------------------------------------------------------------------
|
2017-08-29 21:05:06 +01:00
|
|
|
|
|
|
|
(setq-default custom-file "~/.emacs.d/custom.el")
|
2017-08-24 22:41:18 +01:00
|
|
|
|
|
|
|
|
|
|
|
;; *********************************************************************** ;;
|
|
|
|
;; ;;
|
2017-08-25 22:37:01 +01:00
|
|
|
;; MODULES ;;
|
|
|
|
;; ;;
|
|
|
|
;; ----------------------------------------------------------------------- ;;
|
|
|
|
;; ;;
|
2017-08-24 22:41:18 +01:00
|
|
|
;; ;;
|
|
|
|
;; Visual configuration must come before this point so that the frame can ;;
|
2017-08-24 23:20:38 +01:00
|
|
|
;; be set up before any time consuming package management. ;;
|
2017-08-24 22:41:18 +01:00
|
|
|
;; ;;
|
|
|
|
;; ;;
|
|
|
|
;; *********************************************************************** ;;
|
|
|
|
|
2017-08-24 23:08:47 +01:00
|
|
|
|
2017-08-18 22:30:11 +01:00
|
|
|
;; --------------------------------------------------------------------------
|
2017-08-25 22:37:01 +01:00
|
|
|
;; Initialise and setup `package'.
|
2017-08-18 22:30:11 +01:00
|
|
|
;; --------------------------------------------------------------------------
|
|
|
|
|
|
|
|
(require 'package)
|
|
|
|
(add-to-list 'package-archives
|
|
|
|
'("melpa" . "http://melpa.milkbox.net/packages/") t)
|
|
|
|
(package-initialize)
|
|
|
|
|
2017-08-25 22:37:01 +01:00
|
|
|
;; --------------------------------------------------------------------------
|
|
|
|
;; Load `init-packages'.
|
|
|
|
;; --------------------------------------------------------------------------
|
2017-08-24 21:41:24 +01:00
|
|
|
|
2017-08-25 22:37:01 +01:00
|
|
|
(add-to-list 'load-path "~/.emacs.d/init-packages")
|
|
|
|
(require 'init-packages)
|
2017-08-24 21:41:24 +01:00
|
|
|
|
2017-08-25 22:37:01 +01:00
|
|
|
;; --------------------------------------------------------------------------
|
|
|
|
;; Load modules.
|
|
|
|
;; --------------------------------------------------------------------------
|
2017-08-24 21:41:24 +01:00
|
|
|
|
2017-08-30 01:13:35 +01:00
|
|
|
(init-packages/init '(
|
|
|
|
editing
|
2017-08-27 20:13:04 +01:00
|
|
|
emacs
|
2017-08-30 01:14:15 +01:00
|
|
|
files
|
2017-08-27 20:13:04 +01:00
|
|
|
helm
|
2017-08-28 15:33:56 +01:00
|
|
|
parentheses
|
2017-08-28 18:45:11 +01:00
|
|
|
programming
|
2017-08-30 01:14:25 +01:00
|
|
|
terminal
|
2017-08-25 22:37:01 +01:00
|
|
|
version-control
|
2017-08-30 01:13:35 +01:00
|
|
|
workflow
|
|
|
|
))
|
2017-08-24 21:41:24 +01:00
|
|
|
|
2017-08-24 22:41:18 +01:00
|
|
|
|
|
|
|
;; *********************************************************************** ;;
|
|
|
|
;; ;;
|
|
|
|
;; ;;
|
2017-08-28 19:21:48 +01:00
|
|
|
;; Any configuration that is not in a module or needs to override module ;;
|
|
|
|
;; settings should be set below this point. ;;
|
2017-08-24 22:41:18 +01:00
|
|
|
;; ;;
|
|
|
|
;; ;;
|
2017-08-25 22:37:01 +01:00
|
|
|
;; ----------------------------------------------------------------------- ;;
|
|
|
|
;; ;;
|
|
|
|
;; END MODULES ;;
|
|
|
|
;; ;;
|
2017-08-24 22:41:18 +01:00
|
|
|
;; *********************************************************************** ;;
|
|
|
|
|
2017-08-24 23:08:47 +01:00
|
|
|
|
2017-08-24 22:41:18 +01:00
|
|
|
;; --------------------------------------------------------------------------
|
|
|
|
;; Load any custom variables.
|
|
|
|
;; --------------------------------------------------------------------------
|
2017-08-29 21:05:06 +01:00
|
|
|
|
2017-08-27 11:52:04 +01:00
|
|
|
(load custom-file 'noerror)
|
2017-08-24 22:41:18 +01:00
|
|
|
|
2017-08-27 23:25:14 +01:00
|
|
|
) ;; Reset garbage collection settings.
|