-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit.el
164 lines (141 loc) · 5.57 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
;;; package --- Summary
;;; Code:
;; Helper
(defun megabytes-to-bytes (megabytes)
"Convert megabytes to bytes. Express the value as MEGABYTES."
(* megabytes 1024 1024))
;; (setq-default garbage-collection-messages t) ;; toggle to print GC collection messages
;; set a much higher GC collection threshold than the default setting
(setq gc-cons-threshold (megabytes-to-bytes 32))
(setq read-process-output-max (megabytes-to-bytes 8))
;; change gc threshold post init (if needed)
;; (add-hook 'after-init-hook #'(lambda () (setq gc-cons-threshold (megabytes-to-bytes 32))))
;; --------------------------------------------------------------------
;; setup directories
;; --------------------------------------------------------------------
(defvar user-home-directory (concat (getenv "HOME") "/")
"Home directory location.")
(setq user-emacs-directory (concat user-home-directory ".emacs.d/"))
(add-to-list 'load-path (concat user-emacs-directory "setup-files/"))
(add-to-list 'load-path (concat user-emacs-directory "custom-elisp-code"))
(add-to-list 'load-path (concat user-emacs-directory "custom-elisp-code/bookmark-plus"))
;; --------------------------------------------------------------------
;; initialize package repos and make sure that use-package is installed
;; --------------------------------------------------------------------
(require 'package)
(setq package-enable-at-startup nil)
(setq package-native-compile t) ;; native compilation
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/"))
(add-to-list 'package-archives '("org" . "https://orgmode.org/elpa/") t)
(package-initialize)
;; --------------------------------------------------------------------
;; use-package config
;; --------------------------------------------------------------------
(require 'use-package)
(setq use-package-compute-statistics nil) ;; toggle to t if you want to use M-x use-package-report
(setq use-package-always-ensure t)
(use-package use-package-ensure-system-package)
;; --------------------------------------------------------------------
;; allow to install packages directly from git repos for use-package
;; --------------------------------------------------------------------
(use-package quelpa)
(use-package quelpa-use-package)
;; --------------------------------------------------------------------
;; diminish and bind-key for use-package extra awesomeness
;; --------------------------------------------------------------------
(use-package diminish)
(use-package bind-key)
(use-package general
:config
(setq general-override-states '(insert emacs hybrid normal visual motion operator replace))
(general-override-mode))
;; --------------------------------------------------------------------
;; personal data
;; --------------------------------------------------------------------
(setq user-full-name "Damian Chrzanowski")
;; --------------------------------------------------------------------
;; load setup files
;; --------------------------------------------------------------------
;; core
(require 'sane-defaults-setup)
(require 'help-setup)
(require 'custom-functions)
(require 'saved-macros)
(require 'company-settings-setup)
(require 'eldoc-setup)
(require 'navigation-setup)
(require 'bookmarks-setup)
(require 'debuggers-setup)
(require 'dired-settings-setup)
(require 'editing-assists-setup)
(require 'evil-setup)
(require 'project-assist-setup)
(require 'helm-setup)
(require 'highlights-setup)
(require 'hydra-setup)
(require 'linting-setup)
(require 'package-assistants-setup)
(require 'smartparens-setup)
(require 'yasnippet-setup)
(require 'spell-check-setup)
(require 'alerts-setup)
;; org
(require 'org-setup)
(require 'finance-setup)
;; mail
;; (require 'mu4e-setup)
;; utils
(require 'git-setup)
(require 'shell-setup)
(require 'tramp-setup)
(require 'pdf-setup)
(require 'docker-setup)
(require 'os-utils-setup)
;; languages
(require 'csharp-setup)
(require 'javascript-setup)
(require 'python-setup)
(require 'typescript-setup)
(require 'go-setup)
(require 'r-setup)
(require 'dart-setup)
(require 'rust-setup)
(require 'php-setup)
(require 'web-setup)
(require 'ligatures-setup)
(require 'gdscript-setup)
(require 'lsp-setup)
;; file specific (json, yaml, dot, etc)
(require 'file-specific-setup)
;; keybindings
(require 'key-bindings-setup)
(require 'key-leaders-setup)
(require 'which-key-setup)
;; diminish
(require 'diminish-setup)
;; --------------------------------------------------------------------
;; emacs custom-settings file
;; --------------------------------------------------------------------
(setq custom-file (expand-file-name "custom.el" user-emacs-directory))
(load custom-file)
;; --------------------------------------------------------------------
;; theme setup
;; --------------------------------------------------------------------
(require 'theme-setup)
;; --------------------------------------------------------------------
;; Emacs server
;; --------------------------------------------------------------------
(add-hook 'after-init-hook #'server-start)
;; --------------------------------------------------------------------
;; Open home screen setup
;; --------------------------------------------------------------------
(add-hook 'after-init-hook
#'(lambda () (progn (eyebrowse-switch-to-window-config 7)
(find-file "~/GoogleDrive/org/work_calendar.org")
(split-window-horizontally)
(other-window 1)
(find-file "~/GoogleDrive/org/calendar.org")
(eyebrowse--delete-window-config 1))))
;;; Commentary:
(provide 'init)
;;; init.el ends here