-
Notifications
You must be signed in to change notification settings - Fork 0
/
packages.el
233 lines (194 loc) · 6.52 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
(use-package idomenu)
(use-package rg
:custom
(rg-command-line-flags '("--max-columns" "240" "--max-columns-preview"))
:config
;; (rg-enable-menu "\C-cr")
(defadvice rg-run (after rg-run-after activate)
(rg-save-search))
)
(use-package wgrep
:custom
(wgrep-auto-save-buffer t)
:config
(set-face-attribute 'wgrep-face nil :background "gray80"))
(use-package smart-mode-line
:custom
(sml/no-confirm-load-theme t)
(sml/theme 'dark)
:config
(sml/setup))
(use-package dired-filter)
(use-package dash
:config
(with-eval-after-load 'info-look (dash-register-info-lookup)))
(use-package restclient
:custom
(restclient-same-buffer-response nil)
(restclient-response-body-only t)
(restclient-content-type-modes '(("text/xml" . xml-mode)
("text/plain" . text-mode)
("application/xml" . xml-mode)
("application/json" . json-mode)
("image/png" . image-mode)
("image/jpeg" . image-mode)
("image/jpg" . image-mode)
("image/gif" . image-mode)
("text/html" . html-mode))))
(use-package tree-sitter
:config
;; activate tree-sitter on any buffer containing code for which it has a parser available
(global-tree-sitter-mode)
;; you can easily see the difference tree-sitter-hl-mode makes for python, ts or tsx
;; by switching on and off
(add-hook 'tree-sitter-after-on-hook
(lambda ()
(tree-sitter-hl-mode)
(set-face-attribute 'tree-sitter-hl-face:property nil :slant 'normal))))
(use-package tree-sitter-langs
:after tree-sitter)
(use-package typescript-mode
:after tree-sitter
:config
;; we choose this instead of tsx-mode so that eglot can automatically figure out language for server
;; see https://github.com/joaotavora/eglot/issues/624 and https://github.com/joaotavora/eglot#handling-quirky-servers
(define-derived-mode typescriptreact-mode typescript-mode
"TypeScript TSX")
;; use our derived mode for tsx files
(add-to-list 'auto-mode-alist '("\\.tsx?\\'" . typescriptreact-mode))
;; by default, typescript-mode is mapped to the treesitter typescript parser
;; use our derived mode to map both .tsx AND .ts -> typescriptreact-mode -> treesitter tsx
(add-to-list 'tree-sitter-major-mode-language-alist '(typescriptreact-mode . tsx)))
(use-package tsi
:straight (tsi :type git :host github :repo "orzechowskid/tsi.el")
:init
(add-hook 'typescript-mode-hook (lambda () (tsi-typescript-mode 1)))
(add-hook 'json-mode-hook (lambda () (tsi-json-mode 1)))
(add-hook 'css-mode-hook (lambda () (tsi-css-mode 1)))
(add-hook 'scss-mode-hook (lambda () (tsi-scss-mode 1))))
(use-package markdown-mode
:commands (markdown-mode gfm-mode)
:mode (("README\\.md\\'" . gfm-mode)
("\\.md\\'" . markdown-mode)
("\\.markdown\\'" . markdown-mode))
:custom
(markdown-command "multimarkdown")
(markdown-asymmetric-header t)
:config
(add-hook 'markdown-mode-hook (lambda () (setq indent-tabs-mode nil))))
(use-package browse-kill-ring
:config
(browse-kill-ring-default-keybindings))
(use-package yaml-mode
:custom
(yaml-block-literal-electric-alist '((124 . "") (62 . ""))))
(use-package python-docstring
:custom
(python-docstring-sentence-end-double-space nil)
:config
(python-docstring-install))
(use-package json-mode)
(use-package expand-region)
(use-package multiple-cursors)
(use-package flx-ido
:custom
(flx-ido-threshold 500)
:config
(flx-ido-mode 1))
(use-package ido-completing-read+
:after (ido)
:config
(ido-ubiquitous-mode 1))
(use-package ido
:custom
(ido-auto-merge-work-directories-length -1)
:config
(add-to-list 'ido-read-file-name-non-ido 'dired-create-directory)
(ido-mode 1)
(ido-everywhere 1)
)
(use-package diminish
:config
(diminish 'auto-revert-mode))
(use-package ido-vertical-mode
:config
(ido-vertical-mode))
(use-package request
:custom
(request-curl-options '("--netrc")))
(use-package magit
:straight (magit :type git :host github :repo "aarnej/magit")
:commands (magit-status)
:custom
(magit-diff-refine-hunk 'all)
(magit-fetch-arguments '("--tags"))
(magit-log-arguments '("-n256" "--graph" "--decorate"))
(magit-log-margin-spec '(28 1 magit-duration-spec))
(magit-log-section-arguments '("-n256"))
(magit-log-section-commit-count 20)
(magit-log-show-margin nil)
(magit-reflog-show-margin nil)
(magit-delete-by-moving-to-trash nil)
(magit-display-buffer-function 'magit-display-buffer-same-window-except-diff-v1)
(magit-refs-sections-hook '(magit-insert-error-header
magit-insert-branch-description
magit-insert-local-branches
magit-insert-remote-branches))
(magit-diff-extra-stat-arguments '("--stat-width=200"))
:config
(transient-append-suffix 'magit-fetch "-p"
'("-t" "Fetch all tags" "--tags"))
(magit-add-section-hook 'magit-status-sections-hook
'magit-insert-unpulled-from-pushremote)
(magit-add-section-hook 'magit-status-sections-hook
'magit-insert-ignored-files
nil t)
(magit-add-section-hook 'magit-status-sections-hook
'magit-insert-worktrees
nil t)
)
(use-package projectile
:custom
(projectile-indexing-method 'alien)
(projectile-switch-project-action 'projectile-vc)
:config
(projectile-mode +1)
(diminish 'projectile-mode))
(use-package recentf)
(use-package undo-tree
:custom
(undo-tree-auto-save-history nil)
:config
(global-undo-tree-mode)
(diminish 'undo-tree-mode))
(use-package whitespace
:custom
(whitespace-global-modes '(python-mode))
(whitespace-line-column 79)
(whitespace-style '(face trailing tab-mark))
:config
(add-hook 'before-save-hook 'whitespace-cleanup)
(add-hook 'makefile-gmake-mode-hook #'whitespace-mode)
(diminish 'global-whitespace-mode)
)
(use-package which-key
:custom
(which-key-idle-delay 2.0)
:config
(which-key-mode))
(use-package eslint-fix)
(use-package vlf
:config
(require 'vlf-setup))
(use-package move-text)
(use-package dockerfile-mode)
(use-package ace-window
:custom
(aw-leading-char-style 'path)
(aw-display-mode-overlay nil)
(aw-background nil)
:config
(ace-window-display-mode))
(use-package clojure-mode)
(use-package nvm)
(use-package go-mode)