2017-08-17 21:37:33 +02: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 01:04:38 +02:00
|
|
|
;; Created: 17 Aug 2017
|
2017-08-17 21:37:33 +02:00
|
|
|
;;
|
|
|
|
;;; License: GPLv3
|
2017-08-17 21:38:30 +02:00
|
|
|
|
|
|
|
;; ----------------------------------------------------------------------------
|
|
|
|
;; Run init without garbage collection.
|
|
|
|
;; ----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
(let ((gc-cons-threshold most-positive-fixnum))
|
|
|
|
|
2017-08-17 21:39:43 +02:00
|
|
|
;; --------------------------------------------------------------------------
|
|
|
|
;; Visual configuration.
|
|
|
|
;; --------------------------------------------------------------------------
|
|
|
|
|
2017-08-17 23:41:32 +02:00
|
|
|
;; Font ---------------------------------------------------------------------
|
|
|
|
|
2017-08-19 04:03:34 +02: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 23:41:32 +02:00
|
|
|
|
2017-08-17 21:39:43 +02:00
|
|
|
;; Fullscreen ---------------------------------------------------------------
|
|
|
|
|
2017-08-18 23:27:38 +02:00
|
|
|
(toggle-frame-maximized)
|
2017-08-17 21:39:43 +02: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 23:27:38 +02:00
|
|
|
(blink-cursor-mode -1)
|
2017-08-17 21:39:43 +02:00
|
|
|
|
2017-08-28 00:25:14 +02:00
|
|
|
;; Modeline -----------------------------------------------------------------
|
|
|
|
|
|
|
|
(size-indication-mode 1)
|
|
|
|
(column-number-mode 1)
|
|
|
|
|
2017-08-17 23:41:32 +02:00
|
|
|
;; Theme --------------------------------------------------------------------
|
|
|
|
|
2017-08-27 16:47:40 +02:00
|
|
|
;; Add the necessary paths.
|
2017-08-27 16:07:18 +02:00
|
|
|
(add-to-list 'load-path "~/.emacs.d/themes/")
|
2017-08-24 23:01:08 +02:00
|
|
|
(add-to-list 'custom-theme-load-path "~/.emacs.d/themes/")
|
2017-08-27 16:47:40 +02:00
|
|
|
|
|
|
|
;; Load the dark theme by default.
|
2017-08-27 16:07:18 +02:00
|
|
|
(load-theme 'havoc-dark t) ;; Load personal theme
|
2017-08-17 23:41:32 +02:00
|
|
|
|
2017-08-24 23:41:18 +02:00
|
|
|
;; --------------------------------------------------------------------------
|
|
|
|
;; Change file in which custom variable changes are saved.
|
|
|
|
;; --------------------------------------------------------------------------
|
2017-08-29 22:05:06 +02:00
|
|
|
|
|
|
|
(setq-default custom-file "~/.emacs.d/custom.el")
|
2017-08-24 23:41:18 +02:00
|
|
|
|
|
|
|
|
|
|
|
;; *********************************************************************** ;;
|
|
|
|
;; ;;
|
2017-08-25 23:37:01 +02:00
|
|
|
;; MODULES ;;
|
|
|
|
;; ;;
|
|
|
|
;; ----------------------------------------------------------------------- ;;
|
|
|
|
;; ;;
|
2017-08-24 23:41:18 +02:00
|
|
|
;; ;;
|
|
|
|
;; Visual configuration must come before this point so that the frame can ;;
|
2017-08-25 00:20:38 +02:00
|
|
|
;; be set up before any time consuming package management. ;;
|
2017-08-24 23:41:18 +02:00
|
|
|
;; ;;
|
|
|
|
;; ;;
|
|
|
|
;; *********************************************************************** ;;
|
|
|
|
|
2017-08-25 00:08:47 +02:00
|
|
|
|
2017-08-18 23:30:11 +02:00
|
|
|
;; --------------------------------------------------------------------------
|
2017-08-25 23:37:01 +02:00
|
|
|
;; Initialise and setup `package'.
|
2017-08-18 23:30:11 +02:00
|
|
|
;; --------------------------------------------------------------------------
|
|
|
|
|
|
|
|
(require 'package)
|
|
|
|
(add-to-list 'package-archives
|
|
|
|
'("melpa" . "http://melpa.milkbox.net/packages/") t)
|
|
|
|
(package-initialize)
|
|
|
|
|
2017-08-25 23:37:01 +02:00
|
|
|
;; --------------------------------------------------------------------------
|
2017-09-02 14:45:42 +02:00
|
|
|
;; Load `emodule'.
|
2017-08-25 23:37:01 +02:00
|
|
|
;; --------------------------------------------------------------------------
|
2017-08-24 22:41:24 +02:00
|
|
|
|
2017-09-02 14:45:42 +02:00
|
|
|
(add-to-list 'load-path "~/.emacs.d/emodule")
|
|
|
|
(require 'emodule)
|
2017-08-24 22:41:24 +02:00
|
|
|
|
2017-08-25 23:37:01 +02:00
|
|
|
;; --------------------------------------------------------------------------
|
|
|
|
;; Load modules.
|
|
|
|
;; --------------------------------------------------------------------------
|
2017-08-24 22:41:24 +02:00
|
|
|
|
2017-09-02 21:37:40 +02:00
|
|
|
(emodule/init-debug '(
|
2017-09-02 14:45:42 +02:00
|
|
|
editing
|
|
|
|
emacs
|
|
|
|
files
|
|
|
|
helm
|
2017-09-02 21:37:40 +02:00
|
|
|
helm-gtags
|
2017-09-02 14:45:42 +02:00
|
|
|
parentheses
|
|
|
|
programming
|
|
|
|
terminal
|
|
|
|
version-control
|
|
|
|
workflow
|
|
|
|
))
|
2017-08-24 22:41:24 +02:00
|
|
|
|
2017-08-24 23:41:18 +02:00
|
|
|
|
|
|
|
;; *********************************************************************** ;;
|
|
|
|
;; ;;
|
|
|
|
;; ;;
|
2017-08-28 20:21:48 +02:00
|
|
|
;; Any configuration that is not in a module or needs to override module ;;
|
|
|
|
;; settings should be set below this point. ;;
|
2017-08-24 23:41:18 +02:00
|
|
|
;; ;;
|
|
|
|
;; ;;
|
2017-08-25 23:37:01 +02:00
|
|
|
;; ----------------------------------------------------------------------- ;;
|
|
|
|
;; ;;
|
|
|
|
;; END MODULES ;;
|
|
|
|
;; ;;
|
2017-08-24 23:41:18 +02:00
|
|
|
;; *********************************************************************** ;;
|
|
|
|
|
2017-08-25 00:08:47 +02:00
|
|
|
|
2017-08-24 23:41:18 +02:00
|
|
|
;; --------------------------------------------------------------------------
|
|
|
|
;; Load any custom variables.
|
|
|
|
;; --------------------------------------------------------------------------
|
2017-08-29 22:05:06 +02:00
|
|
|
|
2017-08-27 12:52:04 +02:00
|
|
|
(load custom-file 'noerror)
|
2017-08-24 23:41:18 +02:00
|
|
|
|
2017-08-28 00:25:14 +02:00
|
|
|
) ;; Reset garbage collection settings.
|
2017-09-02 21:37:40 +02:00
|
|
|
(put 'narrow-to-region 'disabled nil)
|