This repository has been archived on 2022-11-18. You can view files and clone it, but cannot push or open issues or pull requests.
emacs/init.el

64 lines
2.2 KiB
EmacsLisp
Raw Normal View History

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
;;
;;; License: GPLv3
2017-08-17 21:38:30 +02:00
;; ----------------------------------------------------------------------------
;; Run init without garbage collection.
;; ----------------------------------------------------------------------------
(let ((gc-cons-threshold most-positive-fixnum))
;; --------------------------------------------------------------------------
;; Configure garbage collection.
;;
;; Based on advice from:
;; http://bling.github.io/blog/2016/01/18/why-are-you-changing-gc-cons-threshold/
;; --------------------------------------------------------------------------
(defun my-minibuffer-setup-hook ()
(setq gc-cons-threshold most-positive-fixnum))
(defun my-minibuffer-exit-hook ()
(setq gc-cons-threshold 800000))
(add-hook 'minibuffer-setup-hook #'my-minibuffer-setup-hook)
(add-hook 'minibuffer-exit-hook #'my-minibuffer-exit-hook)
2017-08-17 21:38:49 +02:00
;; --------------------------------------------------------------------------
;; Include MELPA.
;; --------------------------------------------------------------------------
(require 'package)
(add-to-list 'package-archives
'("melpa" . "http://melpa.milkbox.net/packages/") t)
2017-08-17 21:39:43 +02:00
;; --------------------------------------------------------------------------
;; Visual configuration.
;; --------------------------------------------------------------------------
;; Fullscreen ---------------------------------------------------------------
(add-to-list 'default-frame-alist '(fullscreen . maximized))
;; Visual clutter -----------------------------------------------------------
(scroll-bar-mode -1)
(tool-bar-mode -1)
(menu-bar-mode -1)
;; Scrolling ----------------------------------------------------------------
(setq-default scroll-preserve-screen-position 1)
;; Line number --------------------------------------------------------------
(setq-default linum-format "%4d \u2502") ;; Line number format
(add-hook 'prog-mode-hook 'linum-mode) ;; only in programming modes
2017-08-17 21:38:30 +02:00
) ;; ((gc-cons-threshold most-positive-fixnum))