-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.emacs
231 lines (188 loc) · 6.63 KB
/
.emacs
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
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
(setq inhibit-startup-message t) ;Get rid of startup screen
(scroll-bar-mode -1) ;Disable the scroll bar
(tool-bar-mode -1) ;Disable the tool bar
(tooltip-mode -1) ;Disable tooltips
(set-fringe-mode 10) ;more space
(menu-bar-mode -1) ;Disable menu bar
(setq visible-bell t) ;Set a visual bell
(set-face-attribute 'default nil :font "Fira Code Retina" :height 90)
;;Make Escape quit prompts
(global-set-key (kbd "<escape>") 'keyboard-escape-quit)
;Setup Package Management
(setq package-archives '(("melpa" . "https://melpa.org/packages/")
("org" . "https://orgmode.org/elpa/")
("elpa" . "https://elpa.gnu.org/packages/")))
(package-initialize)
(unless package-archive-contents
(package-refresh-contents))
;; Initiialize use-package on non Linux platforms
(unless (package-installed-p 'use-package)
(package-install 'use-package))
(require 'use-package)
(setq use-package-always-ensure t)
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(custom-enabled-themes '(wombat tango-dark))
'(custom-safe-themes
'("1704976a1797342a1b4ea7a75bdbb3be1569f4619134341bd5a4c1cfb16abad4" default))
'(exwm-floating-border-color "#1c2028")
'(fci-rule-color "#4C566A")
'(highlight-tail-colors ((("#394147") . 0) (("#37424e") . 20)))
'(ivy-mode t)
'(jdee-db-active-breakpoint-face-colors (cons "#191C25" "#81A1C1"))
'(jdee-db-requested-breakpoint-face-colors (cons "#191C25" "#A3BE8C"))
'(jdee-db-spec-breakpoint-face-colors (cons "#191C25" "#434C5E"))
'(objed-cursor-color "#BF616A")
'(package-selected-packages
'(evil general doom-themes helpful ivy-rich which-key rainbow-delimiters doom-modeline counsel ivy command-log-mode use-package))
'(pdf-view-midnight-colors (cons "#ECEFF4" "#2E3440"))
'(rustic-ansi-faces
["#2E3440" "#BF616A" "#A3BE8C" "#EBCB8B" "#81A1C1" "#B48EAD" "#88C0D0" "#ECEFF4"])
'(vc-annotate-background "#2E3440")
'(vc-annotate-color-map
(list
(cons 20 "#A3BE8C")
(cons 40 "#bbc28b")
(cons 60 "#d3c68b")
(cons 80 "#EBCB8B")
(cons 100 "#e2b482")
(cons 120 "#d99d79")
(cons 140 "#D08770")
(cons 160 "#c68984")
(cons 180 "#bd8b98")
(cons 200 "#B48EAD")
(cons 220 "#b77f96")
(cons 240 "#bb7080")
(cons 260 "#BF616A")
(cons 280 "#a05b67")
(cons 300 "#815664")
(cons 320 "#625161")
(cons 340 "#4C566A")
(cons 360 "#4C566A")))
'(vc-annotate-very-old-color nil))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
)
(use-package command-log-mode)
(column-number-mode)
(global-display-line-numbers-mode t)
(dolist(mode `(org-mode-hook
term-mode-hook
shell-mode-hook
eshell-mode-hook))
(add-hook mode (lambda() (display-line-numbers-mode 0))))
(load-theme 'doom-nord t)
;; using IVY instead of helm for completions
(use-package ivy
:diminish
:bind (("C-s" . swiper)
:map ivy-minibuffer-map
("TAB" . ivy-alt-done)
("C-l" . ivy-alt-done)
("C-j" . ivy-next-line)
("C-k" . ivy-previous-line)
:map ivy-switch-buffer-map
("C-k" . ivy-previous-line)
("C-l" . ivy-done)
("C-d" . ivy-switch-buffer-kill)
:map ivy-reverse-i-search-map
("C-k" . ivy-previous-line)
("C-d" . ivy-reverse-i-search-kill))
:config
(setq ivy-mode 1))
(use-package counsel
:bind (("M-x" . counsel-M-x)
("C-x b" . counsel-ibuffer)
("C-x C-f" . counsel-find-file)
:map minibuffer-local-map
("C-r" . 'counsel-minibuffer-history))
:config
(setq ivy-initial-inputs-alist nil))
(global-set-key (kbd "C-M-j") 'counsel-switch-buffer)
(use-package all-the-icons
:if (display-graphic-p))
(use-package doom-modeline
:ensure t
:init (doom-modeline-mode 1)
:custom ((doom-modeline-height 15)))
(use-package doom-themes)
(use-package rainbow-delimiters
:hook (prog-mode . rainbow-delimiters-mode))
(use-package which-key
:init (which-key-mode)
:diminish which-key-mode
:config
(setq which-key-idle-delay 0))
(use-package ivy-rich
:init
(ivy-rich-mode 1))
(use-package helpful
:ensure t
:custom
(counsel-describe-function-function #'helpful-callable)
(counsel-descrive-variable-function #'helpful-variable)
:bind
([remap describe-function] . counsel-describe-function)
([remap describe-command] . helpful-command)
([remap desribe-variable] . counsel-describe-variable)
([remap describe-key] . helpful-key))
(use-package general
:config
(general-create-definer utils/leader-keys
:keymaps `(normal insert visual emacs)
:prefix "SPC"
:global-prefix "C-SPC")
(utils/leader-keys
"t" `(:ignore t :which-key "toggles")
"tt" `(counsel-load-theme :which-key "choose theme")))
(use-package evil
:init
(setq evil-want-integration t)
(setq evil-want-keybinding nil)
(setq evil-want-C-u-scroll t)
(setq evil-want-C-i-jump nil)
:config
(evil-mode 1)
(define-key evil-insert-state-map (kbd "C-g") 'evil-normal-state)
(define-key evil-insert-state-map (kbd "C-h") 'evil-delete-backward-char-and-join)
;; Use visual line motions even outside of visual-line-mode buffers
(evil-global-set-key 'motion "j" 'evil-next-visual-line)
(evil-global-set-key 'motion "k" 'evil-previous-visual-line)
(evil-set-initial-state 'messages-buffer-mode 'normal)
(evil-set-initial-state 'dashboard-mode 'normal))
(use-package evil-collection
:after evil
:config
(evil-collection-init))
(use-package hydra)
(defhydra hydra-text-scale (:timeout 4)
"scale text"
("j" text-scale-increase "in")
("k" text-scale-decrease "out")
("f" nil "finished" :exit t))
(utils/leader-keys
"ts" '(hydra-text-scale/body :which-key "scale text"))
(use-package projectile
:diminish projectile-mode
:config (projectile-mode)
:custom ((projectile-completion-system 'ivy))
:bind-keymap
("C-c p" . projectile-command-map)
:init
;; NOTE: Set this to the folder where you keep your Git repos!
(when (file-directory-p "~/Projects")
(setq projectile-project-search-path '("~/Projects")))
(setq projectile-switch-project-action #'projectile-dired))
(use-package counsel-projectile
:config (counsel-projectile-mode))
(use-package magit
:custom
(magit-display-buffer-function #'magit-display-buffer-same-window-except-diff-v1))
;; (use-package forge)
(use-package org)