summary refs log tree commit diff stats
path: root/early-init.el
blob: 4b67629ebe806b6060d5f3d2320f3779016b8b80 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
;;; early-init.el -*- lexical-binding: t -*-

;; Bankruptcy: 9.4

;; Debugging
;; (setq debug-on-error t
;;       use-package-verbose t)
;; (setq debug-on-message "Selection owner couldn’t convert: TIMESTAMP")

;; Frames
(setq default-frame-alist '((tool-bar-lines . 0)
                            (menu-bar-lines . 0)
                            (vertical-scroll-bars . nil)
                            (horizontal-scroll-bars . nil))
      frame-inhibit-implied-resize t
      frame-resize-pixelwise t
      window-resize-pixelwise t
      inhibit-x-resources t
      indicate-empty-lines nil
      indicate-buffer-boundaries nil)

;; Packages
(require 'package)
(add-to-list 'package-archives
             '("melpa" . "https://melpa.org/packages/") :append)
(add-to-list 'package-archives
             '("melpa-stable" . "https://stable.melpa.org/packages/") :append)
(setq package-priorities '(("melpa" . 3)
                           ("nongnu" . 2)
                           ("gnu" . 1)
                           ("melpa-stable" . 0))
      package-enable-at-startup nil)

(package-initialize)
(unless package-archive-contents
  (package-refresh-contents))

(setq use-package-enable-imenu-support t
      use-package-hook-name-suffix nil)

(eval-when-compile
  (require 'use-package))
(setq use-package-compute-statistics debug-on-error)

(define-advice use-package (:before (name &rest body) select)
  "Add NAME to `package-selected-packages'."
  (when (memq :ensure body)
    (add-to-list 'package-selected-packages name)))

(use-package use-package-vc
  :load-path "~/src/emacs/use-package-vc.el/"
  :config
  (define-advice package-vc-install (:around (orig &rest args) wtf)
    "Don't freak out about `package-archives' shit."
    (let ((package-archives nil))
      (apply orig args))))