-
Notifications
You must be signed in to change notification settings - Fork 0
/
init.el
183 lines (151 loc) · 3.83 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
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
;;; -*- lexical-binding: t; -*-
(set-frame-font "Source Code Pro 11" nil t)
(setq make-backup-files nil)
(setq straight-use-package-by-default t)
(straight-use-package 'use-package)
(use-package a)
(use-package s)
(use-package diminish)
(defvar space-key-map (make-sparse-keymap))
(use-package evil
:init
(setq evil-want-keybinding nil)
(setq evil-want-integration t)
(setq evil-disable-insert-state-bindings t)
:config
(evil-mode 1))
(use-package evil-collection
:diminish evil-collection-unimpaired-mode
:init
(evil-collection-init)
:custom
(evil-collection-setup-minibuffer t))
(use-package general
:config
(general-define-key
:states '(normal visual)
:prefix-map 'space-key-map
:global-prefix "C-SPC"
:prefix "SPC"))
(general-create-definer leader-def
:prefix ","
:states '(normal visual)
"e" '(:ignore t :which-key "eval")
"g" '(:ignore t :which-key "jump")
"r" '(:ignore t :which-key "refactor")
"t" '(:ignore t :which-key "test"))
(use-package emacs
:straight nil
:diminish auto-revert-mode
:general
(space-key-map
"SPC" 'execute-extended-command
"'" 'shell
"b" '("buffer" . (keymap))
"bb" 'ido-switch-buffer
"bd" 'kill-current-buffer
"bs" 'scratch
"f" '("file" . (keymap))
"ff" 'find-file
"w" '("window" . (keymap))
"w/" 'split-window-right
"w-" 'split-window-below
"wd" 'delete-window
"1" 'winum-select-window-1
"2" 'winum-select-window-2
"3" 'winum-select-window-3
"4" 'winum-select-window-4
"5" 'winum-select-window-5
"6" 'winum-select-window-6
"7" 'winum-select-window-7
"8" 'winum-select-window-8
"9" 'winum-select-window-9
"0" 'winum-select-window-0-or-10))
(use-package winum
:config
(require 'winum)
(winum-mode))
(use-package zenburn-theme
:config
(load-theme 'zenburn t))
(show-paren-mode)
(use-package magit
:general
(space-key-map
"g" '("git" . (keymap))
"gs" 'magit-status))
(use-package project
:straight nil
:custom
(project-switch-commands 'project-find-file)
:general
(space-key-map
"p" '("project" . (keymap))
"pp" 'project-switch-project
"pf" 'project-find-file
"p'" 'project-shell))
(use-package scratch
:straight (:host nil :repo "https://codeberg.org/emacs-weirdware/scratch.git"))
(use-package flycheck)
(use-package atomic-chrome
:custom
(atomic-chrome-enable-auto-update t)
(atomic-chrome-default-major-mode 'python-mode))
(use-package vertico
:bind (:map vertico-map
("C-j" . vertico-next)
("C-k" . vertico-previous))
:init
(vertico-mode))
(use-package orderless
:init
(setq completion-styles '(orderless basic))
(setq completion-category-defaults nil)
(setq completion-category-overrides '((file (styles partial-completion)))))
(use-package marginalia
:init
(marginalia-mode))
(use-package consult
:general
(:states '(normal visual)
"/" 'consult-line)
(space-key-map
"/" 'consult-git-grep
"bb" 'consult-buffer))
(use-package corfu
:custom
(corfu-auto t)
:init
(global-corfu-mode)
:bind
(:map corfu-map
("C-j" . 'corfu-next)
("C-k" . 'corfu-previous)))
(use-package eglot
:straight nil
:custom
(eldoc-echo-area-use-multiline-p nil))
(use-package paredit
:diminish paredit-mode
:general
(space-key-map
"k" '("paredit" . (keymap))
"kb" 'paredit-forward-barf-sexp
"kd" 'kill-sexp
"kr" 'paredit-raise-sexp
"ks" 'paredit-forward-slurp-sexp))
(use-package which-key
:diminish which-key-mode
:config
(which-key-mode))
(use-package envrc
:hook (after-init . envrc-global-mode))
(use-package buttercup)
(use-package yaml-mode)
;; setup
(let* ((initd-dir (expand-file-name "init.d" user-emacs-directory))
(files (thread-last
(directory-files initd-dir)
(seq-filter (apply-partially 's-ends-with-p ".el")))))
(dolist (file files)
(load-file (expand-file-name file initd-dir))))