-
Notifications
You must be signed in to change notification settings - Fork 1
/
init.el
68 lines (54 loc) · 2.16 KB
/
init.el
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
57
58
59
60
61
62
63
64
65
66
67
68
;;; init.el --- emacs config
;;; Commentary:
;;; make elisp linter happy
;;; Code:
(add-to-list 'load-path "~/.emacs.d/elpa")
(add-to-list 'load-path "~/.emacs.d/lisp")
(add-to-list 'load-path "~/.emacs.d/vendor")
(defconst basis/emacs-dir
(file-name-directory (file-chase-links (or load-file-name buffer-file-name)))
"This Emacs's configuration directory.")
(defun basis/emacs-dir (name)
"Return directory NAME expanded in `basis/emacs-dir'.
Create the directory if it does not exist and CREATE is non-nil."
(if (string-suffix-p "/" name)
(expand-file-name name basis/emacs-dir)
;; This isn't actually necessary
(error "Directory name should end with a slash")))
(defun basis/emacs-file (name)
"Return file NAME expanded in `basis/emacs-dir'."
(if (not (string-suffix-p "/" name))
(expand-file-name name basis/emacs-dir)
(error "File name should not end with a slash")))
(require 'package)
(setq package-archives '(("gnu" . "http://elpa.gnu.org/packages/")
("marmalade" . "https://marmalade-repo.org/packages/")
("melpa" . "https://melpa.org/packages/")
("melpa-stable" . "http://stable.melpa.org/packages/")
("org" . "http://orgmode.org/elpa/")))
;; workaround TLS but with melpa in some emacs versions
(setq gnutls-algorithm-priority "NORMAL:-VERS-TLS1.3")
(package-initialize)
(unless package-archive-contents
(package-refresh-contents))
(defvar bootstrap-version)
(let ((bootstrap-file
(expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory))
(bootstrap-version 5))
(unless (file-exists-p bootstrap-file)
(with-current-buffer
(url-retrieve-synchronously
"https://raw.githubusercontent.com/raxod502/straight.el/develop/install.el"
'silent 'inhibit-cookies)
(goto-char (point-max))
(eval-print-last-sexp)))
(load bootstrap-file nil 'nomessage))
(require 'use-package)
(setq use-package-always-ensure t)
(require 'kpi_utils)
(require 'emacs_setup)
(require 'lang_setup)
(require 'vis_cust)
(setq custom-file "~/.emacs.d/custom.el")
(load custom-file)
(load-theme 'cybergrind)