You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: readme.org
+88-85Lines changed: 88 additions & 85 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,11 +18,6 @@ This configuration assumes you're running Emacs 28, the latest version (though I
18
18
19
19
The most up-to-date version of this document is located [[https://github.com/patrickt/emacs][on GitHub]]. A better-rendered version can be found [[https://blog.sumtypeofway.com/posts/emacs-config.html][on my blog]], but might not be as current as the first version.
20
20
21
-
** TODOs
22
-
23
-
- Make a popper function that gives Magit a bit more breathing room
24
-
- Disable ~C-c g~ in org-src modes
25
-
26
21
* Configuration: start!
27
22
28
23
** Preliminaries
@@ -58,18 +53,11 @@ Since subsequent packages like ~libgit~ may depend on executables like ~cmake~,
58
53
59
54
#+begin_src emacs-lisp
60
55
;; exec-path-from shell was misbehaving, this hack seems to mollify it
61
-
(defvar fish-location "/usr/local/bin/fish")
62
-
63
56
(use-package exec-path-from-shell
64
57
:init
65
58
(exec-path-from-shell-initialize))
66
59
#+end_src
67
60
68
-
I'm experimenting with ~package-quickstart~ to speed up startup.
With this auxiliary package for ~use-package~, we can instruct Emacs that a given package depends on the presence of a system tool. It will even install this tool with the system's recommended package manager.
75
63
@@ -273,11 +261,6 @@ The out-of-the-box treatment of whitespace is unfortunate, but fixable.
273
261
(deactivate-mark))
274
262
275
263
(bind-key "C-c I" #'pt/indent-just-yanked)
276
-
277
-
(use-package auto-indent-mode
278
-
:disabled ;; fucks with vertico
279
-
:custom (auto-indent-start-org-indent nil)
280
-
:config (auto-indent-mode))
281
264
#+end_src
282
265
283
266
Emacs instances started outside the terminal do not pick up ssh-agent information unless we use keychain-environment.
@@ -361,24 +344,27 @@ I almost never want to quit if readme.org is in a bad state. This warns me shoul
361
344
My RSI hurts a lot.
362
345
363
346
#+begin_src emacs-lisp
364
-
(type-break-mode)
347
+
(setq type-break-file-name nil)
348
+
(type-break-mode)
365
349
#+end_src
366
350
367
351
** Visuals
368
352
369
353
It's a mystery why Emacs doesn't allow colors by default in its compilation buffer, but ~fancy-compilation~ addresses that (and ensures the background color is set to something dark so that programs that make assumptions about)
@@ -399,14 +385,17 @@ Window chrome both wastes space and looks unappealing. (This is actually pasted
399
385
(scroll-bar-mode -1)
400
386
(tooltip-mode -1)
401
387
(pixel-scroll-mode))
388
+
389
+
(when (eq system-type 'darwin)
390
+
(setq ns-auto-hide-menu-bar t))
402
391
#+end_src
403
392
404
393
I use the [[https://github.com/hlissner/emacs-doom-themes][Doom Emacs themes]], which are gorgeous. I sometimes also use Modus Vivendi, the excellent new theme that now ships with Emacs.
405
394
406
395
#+begin_src emacs-lisp
407
396
(use-package doom-themes
408
397
:config
409
-
(let ((chosen-theme 'doom-sourcerer))
398
+
(let ((chosen-theme 'doom-material-dark))
410
399
(doom-themes-visual-bell-config)
411
400
(doom-themes-org-config)
412
401
(setq doom-challenger-deep-brighter-comments t
@@ -453,19 +442,11 @@ The default modeline is pretty uninspiring, and ~mood-line~ is very minimal and
453
442
(mood-line-mode))
454
443
#+end_src
455
444
456
-
I find it useful to have a slightly more apparent indicator of which buffer is active at the moment.
457
-
458
-
#+begin_src emacs-lisp
459
-
(use-package dimmer
460
-
:disabled
461
-
:custom (dimmer-fraction 0.3)
462
-
:config (dimmer-mode))
463
-
#+end_src
464
-
465
445
Highlighting the closing/opening pair associated with a given parenthesis is essential. Furthermore, parentheses should be delimited by color. I may be colorblind, but it's good enough, usually.
466
446
467
447
#+begin_src emacs-lisp
468
448
(use-package rainbow-delimiters
449
+
:disabled
469
450
:hook ((prog-mode . rainbow-delimiters-mode)))
470
451
#+end_src
471
452
@@ -507,33 +488,18 @@ For some reason ~centaur-tabs~ has stopped working. I'm keeping the config aroun
@@ -1186,7 +1146,7 @@ My journey through the various Emacs completion facilities has been long and twi
1186
1146
1187
1147
(use-package consult
1188
1148
:bind (("C-c i" . #'consult-imenu)
1189
-
("C-c b" . #'consult-buffer)
1149
+
("C-c b" . #'consult-project-buffer)
1190
1150
("C-x b" . #'consult-buffer)
1191
1151
("C-c r" . #'consult-recent-file)
1192
1152
("C-c B" . #'consult-bookmark)
@@ -1299,6 +1259,7 @@ Built-in ~xref~ and ~eldoc~ are powerful packages, though we pin them to GNU ELP
1299
1259
#+begin_src emacs-lisp
1300
1260
(use-package xref
1301
1261
:pin gnu :ensure t
1262
+
:custom (xref-auto-jump-to-first-xref t)
1302
1263
:bind (("s-r" . #'xref-find-references)
1303
1264
("C-<down-mouse-1>" . #'xref-find-definitions)
1304
1265
("C-S-<down-mouse-1>" . #'xref-find-references)
@@ -1525,25 +1486,66 @@ Rust is one of my favorite languages in the world.
1525
1486
1526
1487
I occasionally write Go, generally as a glue language to munge things together. I find certain aspects of its creators' philosophies to be repellent, but a language is more than its creators, and it's hard to argue with the success it's found in industry or the degree to which people find it easy to pick up.
1527
1488
1489
+
Amusingly enough, the built-in ~go-remove-unused-imports~ function is useless to put in a save hook, because it requires that the file be saved first, and… yeah, you can imagine how that goes. Cheers to Rob Figueiredo, who wrote a function that uses the ~goimports~ tool like a normal tool would instead of the monstrosity that is ~go-remove-unused-imports~, which searches the current flymake buffer with a regex. 🙄
0 commit comments