blob: a891a70011b312d47b861351bcf8f31ca0d8823c (
plain) (
blame)
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
|
;; bootstrap straight start
(defvar bootstrap-version)
(let ((bootstrap-file
(expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory))
(bootstrap-version 6))
(unless (file-exists-p bootstrap-file)
(with-current-buffer
(url-retrieve-synchronously
"https://raw.githubusercontent.com/radian-software/straight.el/develop/install.el"
'silent 'inhibit-cookies)
(goto-char (point-max))
(eval-print-last-sexp)))
(load bootstrap-file nil 'nomessage))
(use-package straight
:custom
(straight-use-package-by-default t))
;; bootstrap straight end
(use-package which-key
:ensure t)
(use-package evil
:ensure t
:init
(setq evil-want-integration t) ;; This is optional since it's already set to t by default.
(setq evil-want-keybinding nil)
:config
(evil-mode 1))
(use-package evil-collection
:after evil
:ensure t
:config
(evil-collection-init))
(use-package doom-themes
:ensure t )
(setq doom-themes-enable-bold t
doom-themes-enable-italic t)
(load-theme 'doom-one t)
(defun my/setup-font-faces ()
(when (display-graphic-p)
(cond
((find-font (font-spec :name "Inconsolata LGC Nerd Font 11"))
(set-face-attribute 'default nil
:font "Inconsolata LGC Nerd Font 11"
:weight 'medium)))
)
)
(defun my/on-init ()
(my/setup-font-faces)
)
(add-hook 'after-init-hook 'my/on-init)
(add-hook 'server-after-make-frame-hook 'my/on-init)
(setq ring-bell-function 'ignore)
(setq default-line-spacing 0.10)
(setq make-backup-files nil)
(setq auto-save-default nil)
(setq create-lockfiles nil)
(setq warning-minimum-level :error)
(setq inhibit-startup-screen t)
;; Refresh buffers if underlying file changes
(setq globa-auto-revert-mode 1)
;; Disable toolbar, menubar and scrollbar
(menu-bar-mode -1)
(tool-bar-mode -1)
(scroll-bar-mode -1)
(use-package doom-modeline
:ensure t
:init (doom-modeline-mode 1))
;; One line scrolling
(setq scroll-step 1)
(setq scroll-conservatively 10000)
(global-display-line-numbers-mode)
(setq display-line-numbers-type 'relative)
(global-visual-line-mode t)
(use-package dashboard
:ensure t
:config
(setq dashboard-banner-logo-title "Welcome to Emacs Dashboard")
(setq dashboard-footer-messages '("I showed you my source code, plz respond."))
(setq dashboard-center-content nil)
(setq dashboard-items '((recents . 5)
(bookmarks . 5)
(projects . 5)))
(setq dashboard-set-navigator t)
(if (< (length command-line-args) 2)
(setq initial-buffer-choice (lambda ()
(get-buffer-create "*dashboard*")
(dashboard-refresh-buffer)))))
(use-package direnv
:ensure t
:config
(direnv-mode))
(use-package vertico
:ensure t
:init
(vertico-mode))
(use-package marginalia
:ensure t
:init
(marginalia-mode))
(use-package consult
:ensure t
:config
(setq consult-async-min-input 2)
:bind
(:map evil-normal-state-map
("C-S-f" . consult-line)
("C-p" . consult-find)
("C-S-p" . consult-ripgrep)))
(use-package savehist
:ensure t
:init
(savehist-mode))
(use-package projectile
:ensure t
:init
(setq projectile-project-search-path '("~/src/"))
:config
(projectile-mode +1))
(use-package orderless
:ensure t
:custom
(completion-styles '(basic partial-completion orderless)))
(use-package corfu
:ensure t
:config
(setq corfu-auto t)
:init
(global-corfu-mode))
(use-package kind-icon
:ensure t
:after corfu
;:custom
:config
(add-to-list 'corfu-margin-formatters #'kind-icon-margin-formatter))
(use-package flymake
:ensure t
:config
(setq flymake-show-diagnostics-at-end-of-line t))
(use-package eglot
:ensure t
:config
(add-to-list 'eglot-ignored-server-capabilites :hoverProvider)
(setq read-process-output-max (* 1024 1024))
(setq gc-cons-threshold 100000000))
(use-package eldoc-box
:ensure t
:init
(add-hook 'eldoc-mode-hook 'eldoc-box-hover-at-point-mode))
(use-package copilot
:straight (:host github :repo "copilot-emacs/copilot.el" :files ("dist" "*.el"))
:ensure t
:config
(add-hook 'prog-mode-hook 'copilot-mode)
(define-key copilot-completion-map (kbd "<tab>") 'copilot-accept-completion)
(define-key copilot-completion-map (kbd "TAB") 'copilot-accept-completion))
(use-package rustic
:ensure t
:config
(setq rustic-format-on-save t)
(setq rustic-lsp-client 'eglot))
(use-package go-mode
:ensure t
:init
(add-hook 'go-mode-hook 'eglot-ensure))
(use-package dired-sidebar
:ensure t
:config
(setq dired-sidebar-resize-on-open nil)
(setq dired-sidebar-window-fixed nil)
:bind
(:map evil-normal-state-map ("C-b" . dired-sidebar-toggle-sidebar)))
(eval-after-load 'dired
'(evil-define-key 'normal dired-mode-map [mouse-2] 'dired-mouse-find-file)
)
|