Skip to content

Commit 0a4552e

Browse files
author
Patrick Thomson
committed
bump
1 parent 9b658df commit 0a4552e

File tree

2 files changed

+17
-21
lines changed

2 files changed

+17
-21
lines changed

init.el

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,17 @@
1313
(require 'package)
1414

1515
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t)
16-
(add-to-list 'package-archives '("melpa-stable" . "https://stable.melpa.org/packages/") t)
1716
(add-to-list 'package-archives '("ublt" . "https://elpa.ubolonton.org/packages/"))
1817
(add-to-list 'package-archives '("org" . "https://orgmode.org/elpa/") t)
1918
(setq package-native-compile t)
2019
(unless (package-installed-p 'use-package)
2120
(package-refresh-contents)
2221
(package-install 'use-package))
2322

24-
(require 'use-package)
23+
(eval-when-compile (require 'use-package))
2524
(require 'org-install)
2625
(require 'ob-tangle)
2726

28-
(when (boundp 'comp-speed)
29-
(setq comp-speed 2))
30-
3127
(defun reload-config ()
3228
"Reload the literate config from ~/.config/emacs/readme.org."
3329
(interactive)
@@ -36,5 +32,3 @@
3632
(setq max-lisp-eval-depth 2000)
3733

3834
(reload-config)
39-
40-
;;; init.el ends here

readme.org

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,12 @@ This configuration assumes you're running Emacs 28, the latest version (though I
1818

1919
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.
2020

21-
* Configuration: start!
22-
23-
Some TODOs:
21+
** TODOs
2422

25-
- Figure out why we keep getting a save dialog for ~/dev/null~, and ~defadvice~ our way out of this.
26-
- Port flycheck configuration to flymake
2723
- Make a popper function that gives Magit a bit more breathing room
2824

25+
* Configuration: start!
26+
2927
** Preliminaries
3028

3129
We have to be sure to set ~lexical-binding~ in the file header to opt into Emacs lexical scope. Emacs Lisp really isn't the worst language once you pull in the community's /de facto/ standard libraries, but you need lexical scope.
@@ -101,6 +99,8 @@ Fixing Emacs's defaults is a nontrivial problem. We'll start with UI concerns.
10199
confirm-kill-processes nil
102100
;; if native-comp is having trouble, there's not very much I can do
103101
native-comp-async-report-warnings-errors 'silent
102+
;; unicode ellipses are better
103+
truncate-string-ellipsis "…"
104104
)
105105

106106
;; Never mix tabs and spaces. Never use tabs, period.
@@ -165,6 +165,7 @@ By default, the list of recent files gets cluttered up with the contents of down
165165
(use-package recentf
166166
:config
167167
(add-to-list 'recentf-exclude "\\elpa")
168+
(add-to-list 'recentf-exclude "private/tmp")
168169
(recentf-mode))
169170
#+end_src
170171

@@ -458,7 +459,7 @@ Emacs's keybinding for ~comment-dwim~ is ~M-;~, which is not convenient to type
458459
~iedit~ gives us the very popular idiom of automatically deploying multiple cursors to edit all occurrences of a particular word.
459460

460461
#+begin_src emacs-lisp
461-
(use-package iedit)
462+
(use-package iedit :defer t)
462463
#+end_src
463464

464465
Parenthesis matching is one of the flaws in my Emacs setup as of this writing. I know that there are a lot of options out there---~paredit~, ~smartparens~, etc.---but I haven't sat down and really capital-L Learned a better solution than the TextMate-style bracket completion (which Emacs calls, somewhat fancifully, 'electric').
@@ -479,7 +480,7 @@ I got used to a number of convenient TextMate-style commands.
479480
(bind-key "s-<return>" #'pt/eol-then-newline)
480481
#+end_src
481482

482-
It's occasionally useful to be able to search a Unicode character by name.
483+
It's occasionally useful to be able to search a Unicode character by name. And it's a measure of Emacs's performance, when using native-comp and Vertico, that you can search the entire Unicode character space without any keystroke latency.
483484

484485
#+begin_src emacs-lisp
485486
(bind-key "C-c U" #'insert-char)
@@ -831,7 +832,11 @@ Magit also allows integration with GitHub and other such forges (though I hate t
831832
The code-review package allows for integration with pull request comments and such.
832833

833834
#+begin_src emacs-lisp
834-
(use-package code-review :after magit)
835+
(use-package code-review
836+
:after magit
837+
:bind (:map forge-topic-mode-map ("C-c r" . #'code-review-forge-pr-at-point))
838+
:bind (:map code-review-mode-map (("C-c n" . #'code-review-comment-jump-next)
839+
("C-c p" . #'code-review-comment-jump-previous))))
835840
#+end_src
836841

837842
** Project navigation
@@ -893,18 +898,15 @@ My journey through the various Emacs completion facilities has been long and twi
893898
("C-c y" . #'pt/yank-pop)
894899
("C-c R" . #'consult-bookmark)
895900
("C-c `" . #'consult-flymake)
896-
;; I usually use ripgrep, but something in the package's
897-
;; internals is causing a lot of its async requests to fail.
898-
;; It also could be this bleeding-edge Emacs build. Whatever.
899-
;; Git grep is fine.
900-
("C-c h" . #'consult-git-grep)
901+
("C-c h" . #'consult-ripgrep)
901902
("C-x C-f" . #'find-file)
902903
("C-h a" . #'consult-apropos)
903904
)
904905
:custom
905906
(completion-in-region-function #'consult-completion-in-region)
906907
(xref-show-xrefs-function #'consult-xref)
907908
(xref-show-definitions-function #'consult-xref)
909+
(consult-project-root-function #'deadgrep--project-root) ;; ensure ripgrep works
908910
)
909911

910912
(use-package marginalia
@@ -1119,7 +1121,7 @@ I grew up writing in TextMate, so I got extremely used to text-expansion snippet
11191121

11201122
#+begin_src emacs-lisp
11211123
(use-package yasnippet
1122-
:defer 3 ;; takes a while to load, so do it async
1124+
:defer 15 ;; takes a while to load, so do it async
11231125
:diminish yas-minor-mode
11241126
:config (yas-global-mode)
11251127
:custom (yas-prompt-functions '(yas-completing-prompt)))

0 commit comments

Comments
 (0)