Hacker Public Radio

HPR3892: Emacs package curation, part 1


Listen Later

Not really every single one, because straight.el installs
dependencies automatically.
Here's the file I went through during this recording. Some things may
have changed slightly since the time of recording. Save this file in
~/.emacs.d/init.el to reproduce my exact Emacs
configuration that I use at home and at work.
;;; init.el --- This is Tiago's init.el file
;;; Commentary:
;;; Thanks to everyone that curates Emacs packages.
;;; Code:
;; BEGIN Straight.el bootstrap
(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))
;; END Straight.el bootstrap
(straight-use-package 'use-package)
(setq straight-use-package-by-default t)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; <<< THE ESSENTIALS >>> ;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Get minor modes off the modeline
(use-package diminish)
(use-package evil
:init (setq evil-want-keybinding nil)
:config (evil-mode)
:custom (evil-undo-system 'undo-redo)
:bind ("C-u" . evil-scroll-up))
(use-package evil-collection
:diminish evil-collection-unimpaired-mode
:after evil
:config (evil-collection-init))
(use-package evil-surround
:after evil
:config
(global-evil-surround-mode 1))
;; In-Buffer Completion
(use-package company
:diminish
:config (global-company-mode))
;; completion with extra info box
(use-package company-box
:diminish
:hook (company-mode . company-box-mode))
;; Show key bindings as you go
(use-package which-key
:diminish
:config (which-key-mode))
;; search query feedback in the buffer
(use-package anzu
:diminish
:config (global-anzu-mode +1))
(use-package evil-anzu)
;; Completion in the minibuffer (snippet from vertico)
(use-package vertico
:init
(vertico-mode)
;; Different scroll margin
;; (setq vertico-scroll-margin 0)
;; Show more candidates
;; (setq vertico-count 20)
;; Grow and shrink the Vertico minibuffer
;; (setq vertico-resize t)
;; Optionally enable cycling for `vertico-next' and `vertico-previous'.
;; (setq vertico-cycle t)
)
;; Persist history over Emacs restarts. Vertico sorts by history position.
;; (use-package savehist
;; :init
;; (savehist-mode))
;; A few more useful configurations...
(use-package emacs
:init
;; Add prompt indicator to `completing-read-multiple'.
;; We display [CRM<separator>], e.g., [CRM,] if the separator is a comma.
(defun crm-indicator (args)
(cons (format "[CRM%s] %s"
(replace-regexp-in-string
"\`\[.*?]\*\|\[.*?]\*\'" ""
crm-separator)
(car args))
(cdr args)))
(advice-add #'completing-read-multiple :filter-args #'crm-indicator)
;; Do not allow the cursor in the minibuffer prompt
(setq minibuffer-prompt-properties
'(read-only t cursor-intangible t face minibuffer-prompt))
(add-hook 'minibuffer-setup-hook #'cursor-intangible-mode)
;; Emacs 28: Hide commands in M-x which do not work in the current mode.
;; Vertico commands are hidden in normal buffers.
;; (setq read-extended-command-predicate
;; #'command-completion-default-include-p)
;; Enable recursive minibuffers
(setq enable-recursive-minibuffers t))
;; Optionally use the `orderless' completion style.
;; Get completion even if you type substrings that don't match in the
;; same order you typed them in.
(use-package orderless
:init
;; Co
...more
View all episodesView all episodes
Download on the App Store

Hacker Public RadioBy Hacker Public Radio

  • 4.2
  • 4.2
  • 4.2
  • 4.2
  • 4.2

4.2

34 ratings


More shows like Hacker Public Radio

View all
The Changelog: Software Development, Open Source by Changelog Media

The Changelog: Software Development, Open Source

289 Listeners

Defensive Security Podcast - Malware, Hacking, Cyber Security & Infosec by Jerry Bell and Andrew Kalat

Defensive Security Podcast - Malware, Hacking, Cyber Security & Infosec

373 Listeners

LINUX Unplugged by Jupiter Broadcasting

LINUX Unplugged

268 Listeners

SANS Internet Stormcenter Daily Cyber Security Podcast (Stormcast) by Johannes B. Ullrich

SANS Internet Stormcenter Daily Cyber Security Podcast (Stormcast)

653 Listeners

Curious Cases by BBC Radio 4

Curious Cases

826 Listeners

The Strong Towns Podcast by Strong Towns

The Strong Towns Podcast

422 Listeners

Late Night Linux by The Late Night Linux Family

Late Night Linux

164 Listeners

Darknet Diaries by Jack Rhysider

Darknet Diaries

8,035 Listeners

Cybersecurity Today by Jim Love

Cybersecurity Today

181 Listeners

CISO Series Podcast by David Spark, Mike Johnson, and Andy Ellis

CISO Series Podcast

189 Listeners

TechCrunch Daily Crunch by TechCrunch

TechCrunch Daily Crunch

42 Listeners

Strict Scrutiny by Crooked Media

Strict Scrutiny

5,799 Listeners

2.5 Admins by The Late Night Linux Family

2.5 Admins

98 Listeners

Cyber Security Headlines by CISO Series

Cyber Security Headlines

139 Listeners

What the Hack? by DeleteMe

What the Hack?

221 Listeners