No more use-package

This commit is contained in:
Joe Frikker
2026-02-16 23:28:42 -05:00
parent 927e41991b
commit 78de9847a9

482
home.org
View File

@@ -699,7 +699,6 @@ These are just some general settings that apply everywhere. First, a few package
Turn off some default settings that I don't find useful. Turn off some default settings that I don't find useful.
#+BEGIN_SRC elisp #+BEGIN_SRC elisp
;;; -*- lexical-binding: t -*-
(setq inhibit-startup-screen t) (setq inhibit-startup-screen t)
(setq initial-scratch-message nil) (setq initial-scratch-message nil)
(menu-bar-mode -1) (menu-bar-mode -1)
@@ -725,7 +724,7 @@ Automatically refresh ~dired~ buffers when switching to them, instead of requiri
refresh. refresh.
#+BEGIN_SRC elisp #+BEGIN_SRC elisp
(setq dired-auto-revert-buffer t) (setopt dired-auto-revert-buffer t)
#+END_SRC #+END_SRC
Similarly, highlighting the line the cursor is on is really useful for figuring out where you are, Similarly, highlighting the line the cursor is on is really useful for figuring out where you are,
@@ -781,10 +780,10 @@ I have the tab bar at the top of the window. The other settings just clear up so
things look at little nicer. things look at little nicer.
#+BEGIN_SRC elisp #+BEGIN_SRC elisp
(setq doom-modeline-irc nil) (setopt doom-modeline-irc nil)
(setq doom-modeline-workspace-name nil) (setopt doom-modeline-workspace-name nil)
(setq doom-modeline-buffer-encoding nil) (setopt doom-modeline-buffer-encoding nil)
(setq doom-modeline-vcs-max-length 30) (setopt doom-modeline-vcs-max-length 30)
(doom-modeline-mode) (doom-modeline-mode)
#+END_SRC #+END_SRC
@@ -793,9 +792,7 @@ cool, so I'm turning it on in prog mode. The enabled ligatures are font-specific
ligature wiki]]. ligature wiki]].
#+BEGIN_SRC elisp #+BEGIN_SRC elisp
(use-package ligature (require 'ligature)
:after prog-mode
:config
(ligature-set-ligatures 'prog-mode (ligature-set-ligatures 'prog-mode
'("--" "---" "==" "===" "!=" "!==" "=!=" '("--" "---" "==" "===" "!=" "!==" "=!="
"=:=" "=/=" "<=" ">=" "&&" "&&&" "&=" "++" "+++" "***" ";;" "!!" "=:=" "=/=" "<=" ">=" "&&" "&&&" "&=" "++" "+++" "***" ";;" "!!"
@@ -810,7 +807,7 @@ ligature wiki]].
"|||>" "<|||" "<|>" "..." ".." ".=" "..<" ".?" "::" ":::" ":=" "::=" "|||>" "<|||" "<|>" "..." ".." ".=" "..<" ".?" "::" ":::" ":=" "::="
":?" ":?>" "//" "///" "/*" "*/" "/=" "//=" "/==" "@_" "__" "???" ":?" ":?>" "//" "///" "/*" "*/" "/=" "//=" "/==" "@_" "__" "???"
"<:<" ";;;")) "<:<" ";;;"))
(global-ligature-mode t)) (global-ligature-mode t)
#+END_SRC #+END_SRC
Use variable-width fonts in text buffers. ~mixed-pitch-mode~ keeps most code blocks as monospace. Use variable-width fonts in text buffers. ~mixed-pitch-mode~ keeps most code blocks as monospace.
@@ -828,17 +825,15 @@ Use variable-width fonts in text buffers. ~mixed-pitch-mode~ keeps most code blo
A basic ace-window setup. Allows switching between windows quickly (although avy can do the same...). A basic ace-window setup. Allows switching between windows quickly (although avy can do the same...).
#+BEGIN_SRC elisp #+BEGIN_SRC elisp
(use-package ace-window (require 'ace-window)
:bind (("M-o" . ace-window) (bind-keys ("M-o" . ace-window)
("s-o" . ace-window)) ("s-o" . ace-window))
:config (setopt aw-keys '(?a ?s ?d ?f ?g ?h ?j ?k ?l))
(setq aw-keys '(?a ?s ?d ?f ?g ?h ?j ?k ?l)) (setopt aw-dispatch-always t)
(setq aw-dispatch-always t))
#+END_SRC #+END_SRC
Set up a few project- / workspace-related key bindings. Set up a few project- / workspace-related key bindings.
#+name: workspace_keybinds
#+BEGIN_SRC elisp #+BEGIN_SRC elisp
(bind-keys ("s-f" . project-find-file) (bind-keys ("s-f" . project-find-file)
("s-F" . project-switch-project)) ("s-F" . project-switch-project))
@@ -874,13 +869,12 @@ change when drilling into a help page or something. I've set up repeat mode to m
move backward / forward through history. move backward / forward through history.
#+BEGIN_SRC elisp #+BEGIN_SRC elisp
(use-package tab-bar (require 'tab-bar)
:config
(bind-keys :repeat-map tab-bar-repeat-map
("<left>" . tab-bar-history-back)
("<right>" . tab-bar-history-forward))
(tab-bar-history-mode) (tab-bar-history-mode)
(defvar-keymap tab-bar-repeat-map
:repeat t
"<left>" #'tab-bar-history-back
"<right>" #'tab-bar-history-forward))
#+END_SRC #+END_SRC
*** Window Placement *** Window Placement
@@ -950,7 +944,6 @@ This configuration affects general text editing, across all modes. First, some p
enable = true; enable = true;
extraPackages = epkgs: with epkgs; [ extraPackages = epkgs: with epkgs; [
avy avy
devil
edit-indirect edit-indirect
embark embark
god-mode god-mode
@@ -972,7 +965,7 @@ but I'm worried that having too many repeat maps will also be annoying (I'll hav
cancel them more frequently). In the end, I opted for Devil mode. It avoids modifier keys, and has cancel them more frequently). In the end, I opted for Devil mode. It avoids modifier keys, and has
its own devil-mode-only repeat maps that don't interfere when using normal modifier key sequences. its own devil-mode-only repeat maps that don't interfere when using normal modifier key sequences.
#+BEGIN_SRC elisp #+BEGIN_SRC elisp :tangle nil
(use-package devil (use-package devil
:disable t :disable t
:config :config
@@ -988,9 +981,12 @@ its own devil-mode-only repeat maps that don't interfere when using normal modif
("%k p" "%k n" "%k b" "%k f" "%k a" "%k e") ("%k p" "%k n" "%k b" "%k f" "%k a" "%k e")
("%k s") ("%k s")
("%k m d" "%k m <backspace>")))) ("%k m d" "%k m <backspace>"))))
#+END_SRC
#+BEGIN_SRC elisp
(require 'god-mode)
(require 'which-key)
(use-package god-mode
:config
(bind-keys :map god-local-mode-map (bind-keys :map god-local-mode-map
("i" . (lambda () (interactive) (god-mode-all -1))) ("i" . (lambda () (interactive) (god-mode-all -1)))
("z" . repeat)) ("z" . repeat))
@@ -1002,7 +998,7 @@ its own devil-mode-only repeat maps that don't interfere when using normal modif
(t 'bar)))) (t 'bar))))
(add-hook 'post-command-hook 'my-god-mode-update-cursor-type) (add-hook 'post-command-hook 'my-god-mode-update-cursor-type)
(which-key-enable-god-mode-support)) (which-key-enable-god-mode-support)
#+END_SRC #+END_SRC
Avy allows jumping to any place on the screen with just a few keystrokes. I've stolen most of these Avy allows jumping to any place on the screen with just a few keystrokes. I've stolen most of these
@@ -1010,13 +1006,11 @@ ideas from Karthinks' article [[https://karthinks.com/software/avy-can-do-anythi
his article. his article.
#+BEGIN_SRC elisp #+BEGIN_SRC elisp
(use-package avy (require 'avy)
:bind ("M-j" . avy-goto-char-timer)) (require 'embark)
(defun avy-goto-char-timer-embark () (defun avy-goto-char-timer-embark ()
(interactive) (interactive)
(require 'avy)
(require 'embark)
(let ((avy-action-oneshot (let ((avy-action-oneshot
(lambda (pt) (lambda (pt)
(unwind-protect (unwind-protect
@@ -1028,29 +1022,19 @@ his article.
(avy-goto-char-timer))) (avy-goto-char-timer)))
(bind-keys (bind-keys
("M-J" . avy-goto-char-timer-embark)) ("M-j" . avy-goto-char-timer)
("M-J" . avy-goto-char-timer-embark)
(use-package embark ("C-." . embark-act))
:bind
(("C-." . embark-act) ;; pick some comfortable binding
))
#+END_SRC #+END_SRC
Just "silently" wrap when searching at the bottom of a document. Just "silently" wrap when searching at the bottom of a document.
#+BEGIN_SRC elisp #+BEGIN_SRC elisp
(use-package isearch (setopt isearch-wrap-pause 'no-ding)
:custom
(isearch-wrap-pause 'no-ding))
#+END_SRC #+END_SRC
#+BEGIN_SRC elisp #+BEGIN_SRC elisp
(use-package string-inflection (require 'string-inflection)
:commands
string-inflection-java-style-cycle
string-inflection-rust-style-cycle
:config
(defun string-inflection-rust-style-cycle-function (str) (defun string-inflection-rust-style-cycle-function (str)
(cond (cond
((string-inflection-snake-case-p str) ((string-inflection-snake-case-p str)
@@ -1059,18 +1043,18 @@ Just "silently" wrap when searching at the bottom of a document.
(string-inflection-pascal-case-function str)) (string-inflection-pascal-case-function str))
(t (t
(string-inflection-snake-case-function str)))) (string-inflection-snake-case-function str))))
(defun string-inflection-rust-style-cycle () (defun string-inflection-rust-style-cycle ()
(interactive) (interactive)
(string-inflection--symbol-or-region #'string-inflection-rust-style-cycle-function)) (string-inflection--symbol-or-region #'string-inflection-rust-style-cycle-function))
(defvar-keymap string-inflection-java-map
:repeat t
"u" #'string-inflection-java-style-cycle)
(defvar-keymap string-inflection-rust-map
:repeat t
"u" #'string-inflection-rust-style-cycle))
(use-package edit-indirect (bind-keys :repeat-map string-inflection-java-map
:bind ("C-x 4 n" . edit-indirect-region)) ("u" . string-inflection-java-style-cycle))
(bind-keys :repeat-map string-inflection-rust-map
("u" . string-inflection-rust-style-cycle))
(bind-keys ("C-x 4 n" . edit-indirect-region))
#+END_SRC #+END_SRC
** Language Support ** Language Support
@@ -1078,7 +1062,7 @@ Just "silently" wrap when searching at the bottom of a document.
:header-args:elisp: :tangle target/emacs-languages.el :header-args:elisp: :tangle target/emacs-languages.el
:END: :END:
#+BEGIN_SRC nix #+BEGIN_SRC nix :tangle target/emacs-languages.nix
{ {
programs.emacs = { programs.emacs = {
enable = true; enable = true;
@@ -1090,7 +1074,6 @@ Just "silently" wrap when searching at the bottom of a document.
lua-mode lua-mode
nix-mode nix-mode
rust-mode rust-mode
smartparens
sly sly
sly-macrostep sly-macrostep
sql-indent sql-indent
@@ -1110,9 +1093,8 @@ available? It seems to work for now anyway...
#+BEGIN_SRC elisp #+BEGIN_SRC elisp
(electric-pair-mode 1) (electric-pair-mode 1)
(use-package prog-mode (require 'prog-mode)
:config (defun my-prog-fill-reindent-defun (&optional argument)
(defun prog-fill-reindent-defun (&optional argument)
"Refill or reindent the paragraph or defun that contains point. "Refill or reindent the paragraph or defun that contains point.
If the point is in a string or a comment, fill the paragraph that If the point is in a string or a comment, fill the paragraph that
@@ -1134,61 +1116,82 @@ available? It seems to work for now anyway...
(beginning-of-defun) (beginning-of-defun)
(let ((start (point))) (let ((start (point)))
(end-of-defun) (end-of-defun)
(indent-region start (point) nil))))))) (indent-region start (point) nil))))))
#+END_SRC
#+BEGIN_SRC elisp (advice-add 'prog-fill-reindent-defun :override #'my-prog-fill-reindent-defun)
(use-package nix-mode
:mode "\\.nix\\'") (require 'flymake)
(bind-keys :map prog-mode-map
("C-c D" . flymake-show-project-diagnostics)
("M-n" . flymake-goto-next-error)
("M-p" . flymake-goto-prev-error))
(setq-default indent-tabs-mode nil)
(setq-default tab-width 4)
(global-tree-sitter-mode 1)
(setq-default fill-column 100)
(defun jf-init-fill-column ()
(display-fill-column-indicator-mode 1))
(add-hook 'prog-mode-hook 'jf-init-fill-column)
(setopt eglot-ignored-server-capabilities '(:inlayHintProvider))
(add-hook 'eglot-managed-mode-hook (lambda () (eglot-inlay-hints-mode -1)) nil t)
(require 'eglot)
(bind-keys :map eglot-mode-map
("C-c A" . eglot-code-actions)
("C-c R" . eglot-rename)
("C-c I" . eglot-find-implementation))
(setopt ediff-split-window-function 'split-window-horizontally)
(use-package nix-flake
:bind ("C-x p n" . project-nix-flake)
:config
(defun project-nix-flake () (defun project-nix-flake ()
(interactive) (interactive)
(nix-flake (project-root (project-current t))))) (nix-flake (project-root (project-current t))))
(bind-keys ("C-x p n" . project-nix-flake))
#+END_SRC
(use-package lua-mode *** Rust
:mode "\\.lua\\'") #+BEGIN_SRC elisp
;; (setq major-mode-remap-alist '((rust-mode . rust-mode)))
(use-package jenkinsfile-mode (setopt rust-mode-treesitter-derive t)
:mode "\\.jenkinsfile\\'")
(setq major-mode-remap-alist '((rust-mode . rust-mode))) (require 'rust-ts-mode)
(bind-keys :map rust-ts-mode-map
(use-package rust-mode ("C-c u" . string-inflection-rust-style-cycle))
:init (setq rust-mode-treesitter-derive t)) #+END_SRC
*** YAML
#+BEGIN_SRC elisp
(defun yaml-validate () (defun yaml-validate ()
(interactive) (interactive)
(compile (concat "yamllint -d '{extends: default, rules: {indentation: {indent-sequences: false}, braces: {max-spaces-inside: 1}}}' " (buffer-file-name)) t)) (compile (concat "yamllint -d '{extends: default, rules: {indentation: {indent-sequences: false}, braces: {max-spaces-inside: 1}}}' " (buffer-file-name)) t))
(use-package yaml-ts-mode (add-hook 'yaml-ts-mode-hook 'yaml-pro-ts-mode)
:mode "\\.yaml\\'") #+END_SRC
(use-package yaml-pro *** Lisp
:hook (yaml-ts-mode . yaml-pro-ts-mode)) #+BEGIN_SRC elisp
(setopt inferior-lisp-program "sbcl")
(use-package sly (setopt lispy-compat '(god-mode edebug))
:hook lisp-mode-hook (add-hook 'emacs-lisp-mode-hook (lambda () (lispy-mode 1)))
:custom (add-hook 'lisp-mode-hook (lambda () (lispy-mode 1)))
(inferior-lisp-program "sbcl")) (require 'lispy)
(bind-keys :map lispy-mode-map
("i" . (lambda ()
(interactive)
(if god-global-mode
(god-mode-all -1)
(special-lispy-tab)))))
#+END_SRC
(use-package sly-macrostep *** Typescript
:defer t #+BEGIN_SRC elisp
:after sly (setopt typescript-ts-mode-indent-offset 4)
:init (require 'typescript-ts-mode)
(add-to-list 'sly-contribs 'sly-macrostep)) (defun my-tsx-ts-mode--indent-compatibility-b893426 ()
(use-package consult-eglot
:commands
consult-eglot-symbols)
(use-package typescript-ts-mode
:mode "\\.ts\\'" ("\\.tsx\\'" . tsx-ts-mode)
:custom
(typescript-ts-mode-indent-offset 4)
(defun tsx-ts-mode--indent-compatibility-b893426 ()
"Indent rules helper, to handle different releases of tree-sitter-tsx. "Indent rules helper, to handle different releases of tree-sitter-tsx.
Check if a node type is available, then return the right indent rules." Check if a node type is available, then return the right indent rules."
;; handle https://github.com/tree-sitter/tree-sitter-typescript/commit/b893426b82492e59388a326b824a346d829487e8 ;; handle https://github.com/tree-sitter/tree-sitter-typescript/commit/b893426b82492e59388a326b824a346d829487e8
@@ -1198,78 +1201,21 @@ available? It seems to work for now anyway...
((parent-is "jsx_fragment") parent typescript-ts-mode-indent-offset))) ((parent-is "jsx_fragment") parent typescript-ts-mode-indent-offset)))
(treesit-query-error (treesit-query-error
`(((match "<" "jsx_text") parent 0) `(((match "<" "jsx_text") parent 0)
((parent-is "jsx_text") grand-parent typescript-ts-mode-indent-offset)))))) ((parent-is "jsx_text") grand-parent typescript-ts-mode-indent-offset)))))
(advice-add 'tsx-ts-mode--indent-compatibility-b893426 :override #'my-tsx-ts-mode--indent-compatibility-b893426)
#+END_SRC
(use-package rust-ts-mode *** Java
:mode "\\.rs\\'" #+BEGIN_SRC elisp
:config (require 'java-ts-mode)
(bind-keys :map rust-ts-mode-map
("C-c u" . string-inflection-rust-style-cycle)))
(use-package java-ts-mode
:mode "\\.java\\'"
:config
(bind-keys :map java-ts-mode-map (bind-keys :map java-ts-mode-map
("C-c u" . string-inflection-java-style-cycle)) ("C-c u" . string-inflection-java-style-cycle))
(push `((n-p-gp nil "block" "lambda_expression") parent-bol java-ts-mode-indent-offset) (push `((n-p-gp nil "block" "lambda_expression") parent-bol java-ts-mode-indent-offset)
(cdar java-ts-mode--indent-rules)) (cdar java-ts-mode--indent-rules))
(push `((n-p-gp "}" "block" "lambda_expression") parent-bol 0) (push `((n-p-gp "}" "block" "lambda_expression") parent-bol 0)
(cdar java-ts-mode--indent-rules))) (cdar java-ts-mode--indent-rules))
(use-package sql-indent (add-hook 'java-mode-hook (lambda () (c-set-offset 'arglist-intro '+)))
:hook (sql-mode-hook . sqlind-minor-mode))
(use-package haskell-ts-mode
:mode "\\.hs\\'"
:custom (haskell-ts-use-indent tc))
(use-package flymake
:bind
(:map prog-mode-map
("C-c D" . flymake-show-project-diagnostics)
("M-n" . flymake-goto-next-error)
("M-p" . flymake-goto-prev-error)))
(use-package eglot
:commands eglot
:custom
(eglot-ignored-server-capabilities '(:inlayHintProvider))
:config
(bind-keys :map eglot-mode-map
("C-c A" . eglot-code-actions)
("C-c R" . eglot-rename)
("C-c I" . eglot-find-implementation))
(add-hook 'eglot-managed-mode-hook (lambda () (eglot-inlay-hints-mode -1)) nil t))
(use-package lispy
:hook (emacs-lisp-mode lisp-mode)
:init (setq lispy-compat '(god-mode edebug))
:config
(bind-keys :map lispy-mode-map
("i" . (lambda ()
(interactive)
(if god-global-mode
(god-mode-all -1)
(special-lispy-tab))))))
(use-package smartparens
:hook
emacs-lisp-mode
common-lisp-mode
:config
(add-to-list 'sp-lisp-modes 'sly-mrepl-mode)
(require 'smartparens-config)
(setq sp-highlight-pair-overlay nil
sp-highlight-wrap-overlay nil
sp-highlight-wrap-tag-overlay nil))
(setq-default indent-tabs-mode nil)
(setq-default tab-width 4)
(global-tree-sitter-mode 1)
(setq-default fill-column 100)
(defun jf-init-fill-column ()
(display-fill-column-indicator-mode 1))
(defvar jf/class-name-to-file-search-path (list "src/main/java" "src/test/java")) (defvar jf/class-name-to-file-search-path (list "src/main/java" "src/test/java"))
@@ -1291,21 +1237,16 @@ available? It seems to work for now anyway...
; ("^[[:space:]]*at \\(\\(?:[[:lower:]]+\\.\\)+\\)[^(]+(\\([[:alnum:]]+\\)\\.java:\\([[:digit:]]+\\))" ; ("^[[:space:]]*at \\(\\(?:[[:lower:]]+\\.\\)+\\)[^(]+(\\([[:alnum:]]+\\)\\.java:\\([[:digit:]]+\\))"
; jf/compile-class-to-file 3))) ; jf/compile-class-to-file 3)))
;(add-to-list 'compilation-error-regexp-alist 'java-stack-trace) ;(add-to-list 'compilation-error-regexp-alist 'java-stack-trace)
#+END_SRC
(add-hook 'prog-mode-hook 'jf-init-fill-column) *** SQL
(add-hook 'java-mode-hook (lambda () (c-set-offset 'arglist-intro '+))) #+BEGIN_SRC elisp
(add-hook 'sql-mode-hook 'sqlind-minor-mode)
#+END_SRC
;; (dolist (hook *** Haskell
;; (list 'grep-mode-hook #+BEGIN_SRC elisp
;; 'flymake-project-diagnostics-mode-hook (setopt haskell-ts-use-indent t)
;; 'xref--xref-buffer-mode-hook
;; 'embark-collect-mode-hook
;; 'compilation-mode-hook
;; 'sly-mrepl-mode-hook
;; 'eglot-list-connections-mode-hook))
;; (add-hook hook 'tab-line-mode))
(setq ediff-split-window-function 'split-window-horizontally)
#+END_SRC #+END_SRC
** Envrc ** Envrc
@@ -1326,10 +1267,8 @@ available? It seems to work for now anyway...
#+END_SRC #+END_SRC
#+BEGIN_SRC elisp #+BEGIN_SRC elisp
(use-package envrc (add-hook 'after-init-hook 'envrc-global-mode)
:hook (after-init . envrc-global-mode) (setopt envrc-show-summary-in-minibuffer nil)
:custom
(envrc-show-summary-in-minibuffer nil))
#+END_SRC #+END_SRC
** Magit ** Magit
@@ -1354,34 +1293,26 @@ available? It seems to work for now anyway...
#+END_SRC #+END_SRC
#+BEGIN_SRC elisp #+BEGIN_SRC elisp
(use-package magit (setopt magit-define-global-key-bindings 'recommended)
:defer nil (bind-keys ("s-g" . magit-status))
:bind (("C-x g" . magit-status)
("s-g" . magit-status) (setopt magit-save-repository-buffers 'dontask)
("C-x M-g" . magit-dispatch) (setopt magit-commit-show-diff nil)
("C-c M-g" . magit-file-dispatch)) (with-eval-after-load 'magit
:custom
(magit-save-repository-buffers 'dontask)
(magit-commit-show-diff nil)
:config
(set-face-attribute 'git-commit-summary nil :inherit nil) (set-face-attribute 'git-commit-summary nil :inherit nil)
(defun magit-fetch-all-on-load () (defun magit-fetch-all-on-load ()
(magit-run-git-async "fetch" "--all")) (magit-run-git-async "fetch" "--all"))
(add-hook 'magit-status-mode-hook 'magit-fetch-all-on-load) (add-hook 'magit-status-mode-hook 'magit-fetch-all-on-load)
(remove-hook 'magit-status-headers-hook 'magit-insert-tags-header)) (remove-hook 'magit-status-headers-hook 'magit-insert-tags-header)
(require 'forge)
(add-hook 'magit-post-refresh-hook 'diff-hl-magit-post-refresh))
(use-package forge (with-eval-after-load 'forge
:after magit (add-hook 'forge-edit-post-hook 'forge-create-pullreq-insert-single-commit-message)
:custom (setopt forge-status-buffer-default-topic-filters
(forge-edit-post-hook '(forge-create-pullreq-insert-single-commit-message))
(forge-status-buffer-default-topic-filters
(forge--topics-spec :type 'topic :active nil :state 'open :order 'newest))) (forge--topics-spec :type 'topic :active nil :state 'open :order 'newest)))
(use-package diff-hl
:after magit
:config
(global-diff-hl-mode) (global-diff-hl-mode)
(add-hook 'magit-post-refresh-hook 'diff-hl-magit-post-refresh))
#+END_SRC #+END_SRC
** Vertico ** Vertico
@@ -1408,8 +1339,7 @@ available? It seems to work for now anyway...
#+END_SRC #+END_SRC
#+BEGIN_SRC elisp #+BEGIN_SRC elisp
(use-package consult (bind-keys
:bind (
;; ("C-c M-x" . consult-mode-command) ;; ("C-c M-x" . consult-mode-command)
("C-c h" . consult-history) ("C-c h" . consult-history)
;; ("C-c k" . consult-kmacro) ;; ("C-c k" . consult-kmacro)
@@ -1451,15 +1381,16 @@ available? It seems to work for now anyway...
:map minibuffer-local-map :map minibuffer-local-map
("M-s" . consult-history) ("M-s" . consult-history)
("M-r" . consult-history)) ("M-r" . consult-history))
:hook (completion-list-mode . consult-preview-at-point-mode)
:init
(advice-add #'register-preview :override #'consult-register-window)
(setq register-preview-delay 0.5)
(setq xref-show-xrefs-function #'consult-xref xref-show-definitions-function #'consult-xref) (add-hook 'completion-list-mode-hook 'consult-preview-at-point-mode)
:config (advice-add 'register-preview :override #'consult-register-window)
(setopt register-preview-delay 0.5)
(setopt xref-show-xrefs-function 'consult-xref)
(setopt xref-show-definitions-function 'consult-xref)
(require 'consult)
(consult-customize (consult-customize
consult-theme :preview-key '(:debounce 0.2 any) consult-theme :preview-key '(:debounce 0.2 any)
consult-ripgrep consult-git-grep consult-grep consult-man consult-ripgrep consult-git-grep consult-grep consult-man
@@ -1469,44 +1400,25 @@ available? It seems to work for now anyway...
;; :preview-key "M-." ;; :preview-key "M-."
:preview-key '(:debounce 0.4 any)) :preview-key '(:debounce 0.4 any))
(setq consult-narrow-key "<") ;; "C-+" (setopt consult-narrow-key "<") ;; "C-+"
)
(use-package vertico (setopt vertico-count 25)
:custom (vertico-mode)
(vertico-count 25)
:config
(vertico-mode))
;; (use-package vertico-buffer (setopt completion-styles '(orderless basic))
;; :after vertico
;; :config
;; (vertico-buffer-mode))
(use-package orderless (marginalia-mode)
:custom
(completion-styles '(orderless basic)))
(use-package marginalia (setopt corfu-cycle t)
:config (setopt corfu-popupinfo-mode nil)
(marginalia-mode)) (setopt corfu-quit-at-boundary nil)
(setopt corfu-on-exact-match 'show)
(use-package corfu (global-corfu-mode)
:custom
(corfu-cycle t)
(corfu-popupinfo-mode)
(corfu-quit-at-boundary nil)
(corfu-on-exact-match 'show)
:config
(global-corfu-mode))
;; Consult users will also want the embark-consult package. ;; Consult users will also want the embark-consult package.
(use-package embark-consult (add-hook 'embark-collect-mode-hook 'consult-preview-at-point-mode)
:hook (embark-collect-mode . consult-preview-at-point-mode))
(use-package cape (add-hook 'completion-at-point-functions 'cape-file)
:config
(add-hook 'completion-at-point-functions #'cape-file))
#+END_SRC #+END_SRC
** Org ** Org
@@ -1532,23 +1444,14 @@ available? It seems to work for now anyway...
#+END_SRC #+END_SRC
#+BEGIN_SRC elisp #+BEGIN_SRC elisp
(use-package org (require 'org)
:defer nil
:mode ("\\.org\\'" . org-mode) (bind-keys ("C-c a" . org-agenda)
:bind (("C-c a" . org-agenda)
("C-c c" . org-capture) ("C-c c" . org-capture)
("C-c l" . org-store-id-link)) ("C-c l" . org-id-store-link))
:config
(add-hook 'org-mode-hook 'visual-line-mode) (add-hook 'org-mode-hook 'visual-line-mode)
(setq org-link-keep-stored-after-insertion t (setopt org-link-keep-stored-after-insertion t
org-todo-keywords
'((sequence
"TODO(o)"
"IN_PROGRESS(p!)"
"WAITING(w@)"
"|"
"DONE(d!)"
"CANCELLED(c@)"))
org-capture-templates org-capture-templates
'(("t" "Todo" entry '(("t" "Todo" entry
(here) (here)
@@ -1579,12 +1482,13 @@ available? It seems to work for now anyway...
(set-face-attribute 'org-level-5 nil :font "Iosevka Aile") (set-face-attribute 'org-level-5 nil :font "Iosevka Aile")
(set-face-attribute 'org-level-6 nil :font "Iosevka Aile") (set-face-attribute 'org-level-6 nil :font "Iosevka Aile")
(set-face-attribute 'org-level-7 nil :font "Iosevka Aile") (set-face-attribute 'org-level-7 nil :font "Iosevka Aile")
(set-face-attribute 'org-level-8 nil :font "Iosevka Aile")) (set-face-attribute 'org-level-8 nil :font "Iosevka Aile")
(use-package org-present (require 'org-present)
:defer nil (require 'face-remap)
:commands (org-present) (require 'visual-fill-column)
:config
(defvar-local my/org-present-face-remapping-cookies nil)
(defun my/org-present-start () (defun my/org-present-start ()
(setq-local my/org-present-face-remapping-cookies nil) (setq-local my/org-present-face-remapping-cookies nil)
;; Tweak font sizes ;; Tweak font sizes
@@ -1636,26 +1540,21 @@ available? It seems to work for now anyway...
) )
(add-hook 'org-present-mode-hook 'my/org-present-start) (add-hook 'org-present-mode-hook 'my/org-present-start)
(add-hook 'org-present-mode-quit-hook 'my/org-present-end)) (add-hook 'org-present-mode-quit-hook 'my/org-present-end)
(use-package org-roam (require 'org-roam)
:bind (("C-c n l" . org-roam-buffer-toggle) (bind-keys ("C-c n l" . org-roam-buffer-toggle)
("C-c n f" . org-roam-node-find) ("C-c n f" . org-roam-node-find)
("C-c n g" . org-roam-graph) ("C-c n g" . org-roam-graph)
("C-c n i" . org-roam-node-insert) ("C-c n i" . org-roam-node-insert)
("C-c n c" . org-roam-capture)) ("C-c n c" . org-roam-capture))
:config
;; (setq org-roam-node-display-template (concat "${title:*} " (propertize "${tags:10}" 'face 'org-tag))) ;; (setq org-roam-node-display-template (concat "${title:*} " (propertize "${tags:10}" 'face 'org-tag)))
(org-roam-db-autosync-mode)) (org-roam-db-autosync-mode)
(use-package org-modern (add-hook 'org-mode-hook 'org-modern-mode)
:hook org-mode-hook)
(use-package verb (define-key org-mode-map (kbd "C-c C-r") verb-command-map)
:after org
:bind-keymap
(:map org-mode-map
("C-c C-r" . verb-command-map)))
#+END_SRC #+END_SRC
** Terminal ** Terminal
@@ -1676,9 +1575,7 @@ available? It seems to work for now anyway...
#+END_SRC #+END_SRC
#+BEGIN_SRC elisp #+BEGIN_SRC elisp
(use-package eat (eat-eshell-mode)
:config
(eat-eshell-mode))
#+END_SRC #+END_SRC
** Slack ** Slack
@@ -1686,7 +1583,7 @@ available? It seems to work for now anyway...
:header-args:elisp: :tangle target/emacs-slack.el :header-args:elisp: :tangle target/emacs-slack.el
:END: :END:
#+BEGIN_SRC nix #+BEGIN_SRC nix :tangle target/emacs-slack.nix
{ {
programs.emacs = { programs.emacs = {
enable = true; enable = true;
@@ -1694,22 +1591,14 @@ available? It seems to work for now anyway...
slack slack
]; ];
extraConfig = builtins.readFile ./emacs-slack.el; extraConfig = builtins.readFile ./emacs-slack.el;
} };
} }
#+END_SRC #+END_SRC
#+BEGIN_SRC elisp #+BEGIN_SRC elisp
(use-package lui (setopt lui-time-stamp-format "[%Y-%m-%d %H:%M]")
:defer t (setopt slack-render-profile-images-p nil)
:custom (setopt slack-buffer-function #'switch-to-buffer)
(lui-time-stamp-format "[%Y-%m-%d %H:%M]"))
(use-package slack
:commands
slack-start
:custom
(slack-render-profile-images-p nil)
(slack-buffer-function #'switch-to-buffer()))
#+END_SRC #+END_SRC
** Kubernetes ** Kubernetes
@@ -1766,13 +1655,10 @@ available? It seems to work for now anyway...
#+END_SRC #+END_SRC
#+BEGIN_SRC elisp #+BEGIN_SRC elisp
(use-package age (setopt age-default-identity "~/source/dotfiles/keys/yubi1age.txt")
:custom (setopt age-default-recipient "~/source/dotfiles/keys/myself.txt")
(age-default-identity "~/source/dotfiles/keys/yubi1age.txt")
(age-default-recipient "~/source/dotfiles/keys/myself.txt")
:config
(setenv "PINENTRY_PROGRAM" "pinentry-mac") (setenv "PINENTRY_PROGRAM" "pinentry-mac")
(age-file-enable)) (age-file-enable)
#+END_SRC #+END_SRC
* Theme * Theme
@@ -1882,11 +1768,9 @@ I like Catppuccin Frappe as my theme. Let's use it in as many places as we can.
#+END_SRC #+END_SRC
#+BEGIN_SRC elisp #+BEGIN_SRC elisp
(use-package catppuccin-theme (require 'catppuccin-theme)
:custom (setopt catppuccin-flavor 'frappe)
(catppuccin-flavor 'frappe) (load-theme 'catppuccin :no-confirm)
:config
(load-theme 'catppuccin :no-confirm))
;; (set-face-attribute 'default nil :font "JetBrainsMono Nerd Font" :height 130) ;; (set-face-attribute 'default nil :font "JetBrainsMono Nerd Font" :height 130)
;; (set-face-attribute 'fixed-pitch nil :font "JetBrainsMono Nerd Font" :height 130) ;; (set-face-attribute 'fixed-pitch nil :font "JetBrainsMono Nerd Font" :height 130)