-
Notifications
You must be signed in to change notification settings - Fork 34
/
Copy pathpackages.el
233 lines (223 loc) · 5.38 KB
/
packages.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
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
232
233
;;* packages
(require 'cl-seq)
(defconst emacs-d
(file-name-directory
(file-chase-links load-file-name)))
(defconst ora-packages-alist
'(("clojure"
cider
anakondo
(clojure-semantic :host github :repo "abo-abo/clojure-semantic")
clj-refactor
flycheck-clj-kondo
cljr-ivy)
("cpp"
ccls
google-c-style
cmake-mode
elf-mode
function-args)
("shell"
bash-completion
exec-path-from-shell
vterm
coterm)
("python"
company-jedi
jedi
python-pytest
pyimport
(lpy :host github :repo "abo-abo/lpy"))
("elisp"
auto-compile
package-lint
(profile-dotemacs :host github :repo "abo-abo/profile-dotemacs")
use-package
alert
async
request
(whicher :host github :repo "abo-abo/whicher"))
("snippets"
auto-yasnippet
yasnippet
emmet-mode)
("email"
;; bbdb
)
("docker"
docker
docker-tramp
dockerfile-mode)
("org"
(orly :host github :repo "abo-abo/orly")
orca
org-bullets
org-download
org-parser
org-present
visual-fill-column
(org-fu :host github :repo "abo-abo/org-fu")
(org-pomodoro :host github :repo "abo-abo/org-pomodoro")
org-ref
ox-gfm
;; org-roam
pamparam
gtk-pomodoro-indicator
ukrainian-holidays
netherlands-holidays
htmlize
worf)
("avy"
avy
ace-link
ace-popup-menu
ace-window)
("look"
all-the-icons
eclipse-theme
diminish
powerline
rainbow-mode
which-key
command-log-mode
unicode-fonts)
("latex"
auctex
(eltex :host github :repo "abo-abo/eltex"))
("ivy"
counsel
flx
ivy-avy
ivy-bibtex
ivy-posframe
ivy-hydra
ivy-xref
smex)
("words"
define-word
flyspell-correct-ivy
wucuo)
("ide"
company
eglot
flycheck
lsp-java
lsp-mode
lsp-ui
geiser
slime
lispy
(iedit :host github :repo "abo-abo/iedit")
multiple-cursors
helm-make)
("dired"
(dired-guess :host github :repo "abo-abo/dired-guess")
dired-rsync
make-it-so
ready-player)
("major-mode"
abc-mode
go-mode
haskell-mode
rjsx-mode
rust-mode
nginx-mode
markdown-mode
nov
yaml-mode)
("keys"
evil
headlong
(touchpad :host github :repo "abo-abo/touchpad")
hydra)
("files"
magit
forge
git-link
find-file-in-project
projectile
wgrep
super-save
tramp-container)
("sql"
sql-indent
ejc-sql)
("misc"
elfeed
pass
tea-time
transpose-frame)))
(defconst ora-packages
(apply #'append (mapcar #'cdr ora-packages-alist))
"List of packages that I like.")
(let* ((all-pkgs (mapcar
(lambda (p) (if (consp p) (car p) p))
ora-packages))
(git-dirs (mapcar
#'intern
(delete
"." (delete
".." (directory-files (expand-file-name "git" emacs-d))))))
(git-pkgs (cl-intersection git-dirs all-pkgs)))
(setq straight-built-in-pseudo-packages
(append
'(emacs python uniquify dired dired-x cook org)
(and (memq 'swiper git-dirs)
'(swiper ivy ivy-hydra lv counsel))
git-pkgs))
(setq ora-packages
(cl-set-difference ora-packages git-pkgs
:key (lambda (x) (if (consp x) (car x) x)))))
(defun straight-install-packages (packages)
(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))
(dolist (package packages)
(straight-use-package package)))
(defun package-install-packages (packages)
(setq melpa-stable (getenv "MELPA_STABLE"))
(setq package-user-dir
(expand-file-name
(format "~/.elpa/%s/elpa"
(concat emacs-version (when melpa-stable "-stable")))))
(message "installing in %s ...\n" package-user-dir)
(package-initialize)
(setq package-archives
(list (if melpa-stable
'("melpa-stable" . "https://stable.melpa.org/packages/")
'("melpa" . "http://melpa.org/packages/"))
'("gnu" . "http://elpa.gnu.org/packages/")))
(package-refresh-contents)
(dolist (package packages)
(cond
((consp package)
(message "%S: SKIP" package))
((package-installed-p package)
(message "%S: OK" package))
(t
(condition-case nil
(progn
(package-install package)
(message "%S: OK" package))
(error
(message "%S: FAIL" package))))))
(save-window-excursion
(package-list-packages t)
(condition-case nil
(progn
(package-menu-mark-upgrades)
(package-menu-execute t))
(error
(message "All packages up to date")))))
(if nil
(straight-install-packages ora-packages)
(package-install-packages ora-packages))