summary refs log tree commit diff
path: root/emacs/init.el
blob: f15ed966454b9b0893735f5e1ccc06253e6d8be2 (plain) (blame)
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
;;; init.el -- initialize my emacs configuration
;;; Commentary:

;;; Code:
;; Initialize the package system first of all.
(require 'gnutls)
(require 'package)

;; see https://github.com/melpa/melpa/issues/7238
;; without this I'm unable to contact melpa on macos
(setq gnutls-algorithm-priority "NORMAL:-VERS-TLS1.3")

(setq package-archives '(("melpa" . "https://melpa.org/packages/")
                         ("gnu" . "https://elpa.gnu.org/packages/")))

;; and now we load custom configurations
(eval-and-compile
  (add-to-list 'load-path (expand-file-name "custom" user-emacs-directory))
  (add-to-list 'load-path (expand-file-name "lisp" user-emacs-directory))

  (require 'fcuny-vars)

  ;; where to store compiled files
  (when (boundp 'native-comp-eln-load-path)
    (add-to-list 'native-comp-eln-load-path (expand-file-name "eln-cache" fcuny/path-emacs-var)))

  ;; where to store the packages
  (setq package-user-dir fcuny/path-emacs-elpa)

  ;; initialize it
  (setq package-enable-at-startup nil)
  (package-initialize)

  ;; if use-package is not present, we install it
  (unless (package-installed-p 'use-package)
    (package-refresh-contents)
    (package-install 'use-package))
  (require 'use-package)
  (setq use-package-verbose t))

(require 'fcuny-settings)
(require 'fcuny-ui)
(require 'fcuny-navigation)
(require 'fcuny-edit)
(require 'fcuny-text)
(require 'fcuny-git)
(require 'fcuny-org)
(require 'fcuny-conf)
(require 'fcuny-prog)
(require 'fcuny-eshell)
(require 'fcuny-tramp)
(require 'fcuny-notmuch)

(require 'fcuny-defuns)
(require 'fcuny-commands)
(require 'my-work)

;; once we're done initializing the configuration, we start a shell
;; session with eshell.
(fcuny/eshell-main)

;;; init.el ends here