commit - bb7598efa4e158cec3ce0695358ef1e221a35aca
commit + e7c71b9bf2dd17f25b3f4faa6540dfc5c9c5d8b2
blob - /dev/null
blob + fbf72973ff45966ef1e5962576f395c7786e95df (mode 644)
--- /dev/null
+++ .emacs.d/CLAUDE.md
+# CLAUDE.md
+
+This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
+
+## Overview
+
+This is an **Emacs Bedrock** configuration - a minimal, curated starter config based on Emacs 29+. It emphasizes built-in Emacs functionality with selective packages from GNU and non-GNU ELPAs.
+
+## Architecture
+
+### Load Order
+
+1. **early-init.el** - Startup optimizations, GC tuning, frame defaults, macOS appearance
+2. **init.el** - Main configuration, requires Emacs 29+
+3. **extras/*.el** - Optional modules loaded via `load-file`
+
+### Currently Loaded Modules
+
+```elisp
+;; In init.el, these are loaded:
+(load-file (expand-file-name "extras/base.el" user-emacs-directory)) ;; UI/UX
+(load-file (expand-file-name "extras/dev.el" user-emacs-directory)) ;; Development
+(load-file (expand-file-name "extras/email.el" user-emacs-directory)) ;; Template only
+```
+
+### Available Optional Modules (commented out in init.el)
+
+- **vim-like.el** - Evil-mode for vi/vim keybindings
+- **writer.el** - Spell checking (jinx), writing aids
+- **org.el** - Org-mode configuration (requires customization)
+- **researcher.el** - Citar (citations), Denote (note-taking)
+
+## Package Management
+
+- Uses built-in `use-package` macro (Emacs 29+)
+- Packages from GNU ELPA and non-GNU ELPA (no MELPA by default)
+- Packages stored in `elpa/`
+- To add MELPA: uncomment the MELPA section in init.el
+
+## Key Package Stack
+
+**Completion/Minibuffer:**
+- vertico, marginalia, orderless - Minibuffer completion
+- corfu, cape - In-buffer completion
+- consult, embark - Enhanced commands and context actions
+
+**Development:**
+- magit - Git client
+- eglot - LSP client (built-in)
+- TreeSitter mode remapping for yaml, bash, js, ts, json, css, python
+
+## Custom Functions
+
+Only 3 custom elisp functions exist:
+
+1. `bedrock--backup-file-name` (init.el:30) - Backup directory structure
+2. `bedrock/avy-action-embark` (extras/base.el:46) - Avy + Embark integration
+3. `bedrock/setup-eshell` (extras/base.el:95) - Eshell configuration
+
+## Elisp Development Notes
+
+- Test changes: `M-x eval-buffer` or `C-x C-e` to eval expression
+- Reload config: Restart Emacs or `M-x load-file RET ~/.emacs.d/init.el`
+- Check for errors: `*Messages*` buffer or start with `emacs --debug-init`
+- Package refresh: `M-x package-refresh-contents`
+
+## File Locations
+
+- Backups: `~/.emacs.d/emacs-backup/`
+- Compiled elisp: `eln-cache/`
+- Package data: `elpa/`
blob - /dev/null
blob + 6e16da91d7577eba00bb3b97134d11160186b7a4 (mode 644)
--- /dev/null
+++ .emacs.d/bsd-dark-theme.el
+;;; bsd-dark-theme.el --- BSD Dark theme for Emacs -*- lexical-binding: t -*-
+
+;; Author: Sara
+;; Version: 1.0
+;; Package-Requires: ((emacs "24.1"))
+;; Keywords: faces, theme
+;; URL: https://github.com/sara/bsd-dark-theme
+
+;; This theme is based on the Ghostty BSD Dark terminal theme.
+
+;;; Commentary:
+
+;; A dark theme with earthy, BSD-inspired colors featuring muted golds,
+;; browns, and warm accents.
+
+;;; Code:
+
+(deftheme bsd-dark
+ "BSD Dark theme - earthy colors inspired by BSD aesthetics.")
+
+(let ((class '((class color) (min-colors 89)))
+ ;; Core colors
+ (bg "#14130e")
+ (fg "#b7a980")
+ (cursor "#7a7154")
+ (selection "#a34110")
+ ;; Normal colors (palette 0-7)
+ (black "#161510")
+ (red "#a32810")
+ (green "#727a18")
+ (yellow "#a37720")
+ (blue "#3d6266")
+ (magenta "#7a4a55")
+ (cyan "#557a55")
+ (white "#998d6b")
+ ;; Bright colors (palette 8-15)
+ (br-black "#4c4635")
+ (br-red "#cc3214")
+ (br-green "#8e991e")
+ (br-yellow "#cc9528")
+ (br-blue "#4c7b7f")
+ (br-magenta "#995b6b")
+ (br-cyan "#6b996b")
+ (br-white "#cdbc8e"))
+
+ (custom-theme-set-faces
+ 'bsd-dark
+
+ ;; Basic faces
+ `(default ((,class (:foreground ,fg :background ,bg))))
+ `(cursor ((,class (:background ,cursor))))
+ `(region ((,class (:background ,selection))))
+ `(highlight ((,class (:background ,br-black))))
+ `(hl-line ((,class (:background ,black))))
+ `(fringe ((,class (:background ,bg :foreground ,br-black))))
+ `(vertical-border ((,class (:foreground ,br-black))))
+ `(border ((,class (:background ,br-black))))
+ `(shadow ((,class (:foreground ,br-black))))
+
+ ;; Mode line
+ `(mode-line ((,class (:foreground ,br-white :background ,black :box (:line-width 1 :color ,br-black)))))
+ `(mode-line-inactive ((,class (:foreground ,white :background ,bg :box (:line-width 1 :color ,br-black)))))
+ `(mode-line-buffer-id ((,class (:foreground ,br-yellow :weight bold))))
+ `(mode-line-emphasis ((,class (:foreground ,br-white :weight bold))))
+
+ ;; Font lock (syntax highlighting)
+ `(font-lock-builtin-face ((,class (:foreground ,br-blue))))
+ `(font-lock-comment-face ((,class (:foreground ,br-black))))
+ `(font-lock-comment-delimiter-face ((,class (:foreground ,br-black))))
+ `(font-lock-constant-face ((,class (:foreground ,br-magenta))))
+ `(font-lock-doc-face ((,class (:foreground ,green))))
+ `(font-lock-function-name-face ((,class (:foreground ,br-yellow))))
+ `(font-lock-keyword-face ((,class (:foreground ,br-red))))
+ `(font-lock-negation-char-face ((,class (:foreground ,red))))
+ `(font-lock-preprocessor-face ((,class (:foreground ,magenta))))
+ `(font-lock-regexp-grouping-backslash ((,class (:foreground ,yellow))))
+ `(font-lock-regexp-grouping-construct ((,class (:foreground ,magenta))))
+ `(font-lock-string-face ((,class (:foreground ,br-green))))
+ `(font-lock-type-face ((,class (:foreground ,br-cyan))))
+ `(font-lock-variable-name-face ((,class (:foreground ,fg))))
+ `(font-lock-warning-face ((,class (:foreground ,br-red :weight bold))))
+
+ ;; Line numbers
+ `(line-number ((,class (:foreground ,br-black :background ,bg))))
+ `(line-number-current-line ((,class (:foreground ,br-yellow :background ,black))))
+
+ ;; Search
+ `(isearch ((,class (:foreground ,bg :background ,br-yellow))))
+ `(isearch-fail ((,class (:foreground ,br-white :background ,red))))
+ `(lazy-highlight ((,class (:foreground ,bg :background ,yellow))))
+
+ ;; Minibuffer
+ `(minibuffer-prompt ((,class (:foreground ,br-blue :weight bold))))
+
+ ;; Links
+ `(link ((,class (:foreground ,br-blue :underline t))))
+ `(link-visited ((,class (:foreground ,br-magenta :underline t))))
+
+ ;; Errors, warnings, success
+ `(error ((,class (:foreground ,br-red :weight bold))))
+ `(warning ((,class (:foreground ,br-yellow :weight bold))))
+ `(success ((,class (:foreground ,br-green :weight bold))))
+
+ ;; Parentheses matching
+ `(show-paren-match ((,class (:foreground ,bg :background ,br-cyan))))
+ `(show-paren-mismatch ((,class (:foreground ,bg :background ,br-red))))
+
+ ;; Completions
+ `(completions-common-part ((,class (:foreground ,br-blue))))
+ `(completions-first-difference ((,class (:foreground ,br-yellow :weight bold))))
+
+ ;; Dired
+ `(dired-directory ((,class (:foreground ,br-blue :weight bold))))
+ `(dired-symlink ((,class (:foreground ,br-cyan))))
+ `(dired-ignored ((,class (:foreground ,br-black))))
+
+ ;; Org mode
+ `(org-level-1 ((,class (:foreground ,br-yellow :weight bold))))
+ `(org-level-2 ((,class (:foreground ,br-blue :weight bold))))
+ `(org-level-3 ((,class (:foreground ,br-green :weight bold))))
+ `(org-level-4 ((,class (:foreground ,br-magenta :weight bold))))
+ `(org-level-5 ((,class (:foreground ,br-cyan :weight bold))))
+ `(org-level-6 ((,class (:foreground ,br-red :weight bold))))
+ `(org-level-7 ((,class (:foreground ,yellow :weight bold))))
+ `(org-level-8 ((,class (:foreground ,blue :weight bold))))
+ `(org-todo ((,class (:foreground ,br-red :weight bold))))
+ `(org-done ((,class (:foreground ,br-green :weight bold))))
+ `(org-headline-done ((,class (:foreground ,white))))
+ `(org-link ((,class (:foreground ,br-blue :underline t))))
+ `(org-date ((,class (:foreground ,br-cyan))))
+ `(org-code ((,class (:foreground ,br-green :background ,black))))
+ `(org-block ((,class (:background ,black))))
+ `(org-block-begin-line ((,class (:foreground ,br-black :background ,black))))
+ `(org-block-end-line ((,class (:foreground ,br-black :background ,black))))
+
+ ;; Whitespace
+ `(whitespace-space ((,class (:foreground ,br-black))))
+ `(whitespace-tab ((,class (:foreground ,br-black))))
+ `(whitespace-newline ((,class (:foreground ,br-black))))
+ `(whitespace-trailing ((,class (:background ,red))))
+
+ ;; Term colors (for ansi-term, vterm, etc.)
+ `(term-color-black ((,class (:foreground ,black :background ,black))))
+ `(term-color-red ((,class (:foreground ,red :background ,red))))
+ `(term-color-green ((,class (:foreground ,green :background ,green))))
+ `(term-color-yellow ((,class (:foreground ,yellow :background ,yellow))))
+ `(term-color-blue ((,class (:foreground ,blue :background ,blue))))
+ `(term-color-magenta ((,class (:foreground ,magenta :background ,magenta))))
+ `(term-color-cyan ((,class (:foreground ,cyan :background ,cyan))))
+ `(term-color-white ((,class (:foreground ,white :background ,white))))))
+
+;;;###autoload
+(when load-file-name
+ (add-to-list 'custom-theme-load-path
+ (file-name-as-directory (file-name-directory load-file-name))))
+
+(provide-theme 'bsd-dark)
+
+;;; bsd-dark-theme.el ends here
blob - /dev/null
blob + 6eb4fa0364f504e328aae45269f54037224ad7fa (mode 644)
--- /dev/null
+++ .emacs.d/early-init.el
+;;; ________ _______ __ __
+;;; / | / \ / | / |
+;;; $$$$$$$$/ _____ ____ ______ _______ _______ $$$$$$$ | ______ ____$$ | ______ ______ _______$$ | __
+;;; $$ |__ / \/ \ / \ / |/ | $$ |__$$ |/ \ / $$ |/ \ / \ / $$ | / |
+;;; $$ | $$$$$$ $$$$ |$$$$$$ /$$$$$$$//$$$$$$$/ $$ $$</$$$$$$ /$$$$$$$ /$$$$$$ /$$$$$$ /$$$$$$$/$$ |_/$$/
+;;; $$$$$/ $$ | $$ | $$ |/ $$ $$ | $$ \ $$$$$$$ $$ $$ $$ | $$ $$ | $$/$$ | $$ $$ | $$ $$<
+;;; $$ |_____$$ | $$ | $$ /$$$$$$$ $$ \_____ $$$$$$ | $$ |__$$ $$$$$$$$/$$ \__$$ $$ | $$ \__$$ $$ \_____$$$$$$ \
+;;; $$ $$ | $$ | $$ $$ $$ $$ / $$/ $$ $$/$$ $$ $$ $$ | $$ $$/$$ $$ | $$ |
+;;; $$$$$$$$/$$/ $$/ $$/ $$$$$$$/ $$$$$$$/$$$$$$$/ $$$$$$$/ $$$$$$$/ $$$$$$$/$$/ $$$$$$/ $$$$$$$/$$/ $$/
+
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;
+;;; Basic settings for quick startup and convenience
+;;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+;; Startup speed, annoyance suppression
+(setq bedrock--initial-gc-threshold gc-cons-threshold)
+(setq gc-cons-threshold 10000000)
+(setq byte-compile-warnings '(not obsolete))
+(setq warning-suppress-log-types '((comp) (bytecomp)))
+(setq native-comp-async-report-warnings-errors 'silent)
+
+;; Silence stupid startup message
+(setq inhibit-startup-echo-area-message (user-login-name))
+
+;; Default frame configuration: full screen, good-looking title bar on macOS
+(setq frame-resize-pixelwise t)
+(tool-bar-mode -1) ; All these tools are in the menu-bar anyway
+(setq default-frame-alist '(
+
+ ;; You can turn off scroll bars by uncommenting these lines:
+ ;; (vertical-scroll-bars . nil)
+ ;; (horizontal-scroll-bars . nil)
+
+ ;; Setting the face in here prevents flashes of
+ ;; color as the theme gets activated
+ (background-color . "#000000")
+ (foreground-color . "#CBBC91")
+ (ns-appearance . dark)
+ (ns-transparent-titlebar . t)
+ (font . "Comic Code-14")))
blob - /dev/null
blob + d3ca6b4f4c6fe1f4650f40701818c62165c37443 (mode 644)
--- /dev/null
+++ .emacs.d/extras/base.el
+;;; Emacs Bedrock
+;;;
+;;; Extra config: Base enhancements
+
+;;; Usage: Append or require this file from init.el to enable various UI/UX
+;;; enhancements.
+;;;
+;;; The consult package in particular has a vast number of functions that you
+;;; can use as replacements to what Emacs provides by default. Please see the
+;;; consult documentation for more information and help:
+;;;
+;;; https://github.com/minad/consult
+;;;
+;;; In particular, many users may find `consult-line' to be more useful to them
+;;; than isearch, so binding this to `C-s' might make sense. This is left to the
+;;; user to configure, however, as isearch and consult-line are not equivalent.
+
+;;; Contents:
+;;;
+;;; - Motion aids
+;;; - Power-ups: Embark and Consult
+;;; - Minibuffer and completion
+;;; - Misc. editing enhancements
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;
+;;; Motion aids
+;;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+(use-package avy
+ :ensure t
+ :demand t
+ :bind (("C-c j" . avy-goto-line)
+ ("s-j" . avy-goto-char-timer)))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;
+;;; Power-ups: Embark and Consult
+;;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+;; Consult: Misc. enhanced commands
+(use-package consult
+ :ensure t
+ :bind (
+ ;; Drop-in replacements
+ ("C-x b" . consult-buffer) ; orig. switch-to-buffer
+ ("M-y" . consult-yank-pop) ; orig. yank-pop
+ ;; Searching
+ ("M-s r" . consult-ripgrep)
+ ("M-s l" . consult-line) ; Alternative: rebind C-s to use
+ ("M-s s" . consult-line) ; consult-line instead of isearch, bind
+ ("M-s L" . consult-line-multi) ; isearch to M-s s
+ ("M-s o" . consult-outline)
+ ;; Isearch integration
+ :map isearch-mode-map
+ ("M-e" . consult-isearch-history) ; orig. isearch-edit-string
+ ("M-s e" . consult-isearch-history) ; orig. isearch-edit-string
+ ("M-s l" . consult-line) ; needed by consult-line to detect isearch
+ ("M-s L" . consult-line-multi) ; needed by consult-line to detect isearch
+ )
+ :config
+ ;; Narrowing lets you restrict results to certain groups of candidates
+ (setq consult-narrow-key "<"))
+
+(use-package embark-consult
+ :ensure t)
+
+;; Embark: supercharged context-dependent menu; kinda like a
+;; super-charged right-click.
+(use-package embark
+ :ensure t
+ :demand t
+ :after (avy embark-consult)
+ :bind (("C-c a" . embark-act)) ; bind this to an easy key to hit
+ :init
+ ;; Add the option to run embark when using avy
+ (defun bedrock/avy-action-embark (pt)
+ (unwind-protect
+ (save-excursion
+ (goto-char pt)
+ (embark-act))
+ (select-window
+ (cdr (ring-ref avy-ring 0))))
+ t)
+
+ ;; After invoking avy-goto-char-timer, hit "." to run embark at the next
+ ;; candidate you select
+ (setf (alist-get ?. avy-dispatch-alist) 'bedrock/avy-action-embark))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;
+;;; Minibuffer and completion
+;;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+;; Vertico: better vertical completion for minibuffer commands
+(use-package vertico
+ :ensure t
+ :init
+ ;; You'll want to make sure that e.g. fido-mode isn't enabled
+ (vertico-mode))
+
+(use-package vertico-directory
+ :ensure nil
+ :after vertico
+ :bind (:map vertico-map
+ ("M-DEL" . vertico-directory-delete-word)))
+
+;; Marginalia: annotations for minibuffer
+(use-package marginalia
+ :ensure t
+ :config
+ (marginalia-mode))
+
+;; Corfu: Popup completion-at-point
+(use-package corfu
+ :ensure t
+ :init
+ (global-corfu-mode)
+ :bind
+ (:map corfu-map
+ ("SPC" . corfu-insert-separator)
+ ("C-n" . corfu-next)
+ ("C-p" . corfu-previous)))
+
+;; Part of corfu
+(use-package corfu-popupinfo
+ :after corfu
+ :ensure nil
+ :hook (corfu-mode . corfu-popupinfo-mode)
+ :custom
+ (corfu-popupinfo-delay '(0.25 . 0.1))
+ (corfu-popupinfo-hide nil)
+ :config
+ (corfu-popupinfo-mode))
+
+;; Make corfu popup come up in terminal overlay
+(use-package corfu-terminal
+ :if (not (display-graphic-p))
+ :ensure t
+ :config
+ (corfu-terminal-mode))
+
+;; Fancy completion-at-point functions; there's too much in the cape package to
+;; configure here; dive in when you're comfortable!
+(use-package cape
+ :ensure t
+ :init
+ (add-to-list 'completion-at-point-functions #'cape-dabbrev)
+ (add-to-list 'completion-at-point-functions #'cape-file))
+
+;; Pretty icons for corfu
+(use-package kind-icon
+ :if (display-graphic-p)
+ :ensure t
+ :after corfu
+ :config
+ (add-to-list 'corfu-margin-formatters #'kind-icon-margin-formatter))
+
+(use-package eshell
+ :init
+ (defun bedrock/setup-eshell ()
+ ;; Something funny is going on with how Eshell sets up its keymaps; this is
+ ;; a work-around to make C-r bound in the keymap
+ (keymap-set eshell-mode-map "C-r" 'consult-history))
+ :hook ((eshell-mode . bedrock/setup-eshell)))
+
+;; Eat: Emulate A Terminal
+(use-package eat
+ :ensure t
+ :custom
+ (eat-term-name "xterm")
+ :config
+ (eat-eshell-mode) ; use Eat to handle term codes in program output
+ (eat-eshell-visual-command-mode)) ; commands like less will be handled by Eat
+
+;; Orderless: powerful completion style
+(use-package orderless
+ :ensure t
+ :config
+ (setq completion-styles '(orderless)))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;
+;;; Misc. editing enhancements
+;;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+;; Modify search results en masse
+(use-package wgrep
+ :ensure t
+ :config
+ (setq wgrep-auto-save-buffer t))
blob - /dev/null
blob + cf0530e3fffd988dbd79053bc6ce40797d7b215e (mode 644)
--- /dev/null
+++ .emacs.d/extras/dev.el
+;;; Emacs Bedrock
+;;;
+;;; Extra config: Development tools
+
+;;; Usage: Append or require this file from init.el for some software
+;;; development-focused packages.
+;;;
+;;; It is **STRONGLY** recommended that you use the base.el config if you want to
+;;; use Eglot. Lots of completion things will work better.
+;;;
+;;; This will try to use tree-sitter modes for many languages. Please run
+;;;
+;;; M-x treesit-install-language-grammar
+;;;
+;;; Before trying to use a treesit mode.
+
+;;; Contents:
+;;;
+;;; - Built-in config for developers
+;;; - Version Control
+;;; - Common file types
+;;; - Eglot, the built-in LSP client for Emacs
+;;; - Templating
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;
+;;; Built-in config for developers
+;;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+(use-package emacs
+ :config
+ ;; Treesitter config
+
+ ;; Tell Emacs to prefer the treesitter mode
+ ;; You'll want to run the command `M-x treesit-install-language-grammar' before editing.
+ (setq major-mode-remap-alist
+ '((yaml-mode . yaml-ts-mode)
+ (bash-mode . bash-ts-mode)
+ (js2-mode . js-ts-mode)
+ (typescript-mode . typescript-ts-mode)
+ (json-mode . json-ts-mode)
+ (css-mode . css-ts-mode)
+ (python-mode . python-ts-mode)))
+ :hook
+ ;; Auto parenthesis matching
+ ((prog-mode . electric-pair-mode)))
+
+(use-package project
+ :custom
+ (when (>= emacs-major-version 30)
+ (project-mode-line t))) ; show project name in modeline
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;
+;;; Version Control
+;;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+;; Magit: best Git client to ever exist
+(use-package magit
+ :ensure t
+ :bind (("C-x g" . magit-status)))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;
+;;; Common file types
+;;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+(use-package markdown-mode
+ :ensure t
+ :hook ((markdown-mode . visual-line-mode)))
+
+(use-package yaml-mode
+ :ensure t)
+
+(use-package json-mode
+ :ensure t)
+
+;; Emacs ships with a lot of popular programming language modes. If it's not
+;; built in, you're almost certain to find a mode for the language you're
+;; looking for with a quick Internet search.
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;
+;;; Eglot, the built-in LSP client for Emacs
+;;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+;; Helpful resources:
+;;
+;; - https://www.masteringemacs.org/article/seamlessly-merge-multiple-documentation-sources-eldoc
+
+(use-package eglot
+ ;; no :ensure t here because it's built-in
+
+ ;; Configure hooks to automatically turn-on eglot for selected modes
+ ; :hook
+ ; (((python-mode ruby-mode elixir-mode) . eglot-ensure))
+
+ :custom
+ (eglot-send-changes-idle-time 0.1)
+ (eglot-extend-to-xref t) ; activate Eglot in referenced non-project files
+
+ :config
+ (fset #'jsonrpc--log-event #'ignore) ; massive perf boost---don't log every event
+ ;; Sometimes you need to tell Eglot where to find the language server
+ ; (add-to-list 'eglot-server-programs
+ ; '(haskell-mode . ("haskell-language-server-wrapper" "--lsp")))
+ )
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;
+;;; Templating
+;;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+(use-package tempel
+ :ensure t
+ ;; By default, tempel looks at the file "templates" in
+ ;; user-emacs-directory, but you can customize that with the
+ ;; tempel-path variable:
+ ;; :custom
+ ;; (tempel-path (concat user-emacs-directory "custom_template_file"))
+ :bind (("M-*" . tempel-insert)
+ ("M-+" . tempel-complete)
+ :map tempel-map
+ ("C-c RET" . tempel-done)
+ ("C-<down>" . tempel-next)
+ ("C-<up>" . tempel-previous)
+ ("M-<down>" . tempel-next)
+ ("M-<up>" . tempel-previous))
+ :init
+ ;; Make a function that adds the tempel expansion function to the
+ ;; list of completion-at-point-functions (capf).
+ (defun tempel-setup-capf ()
+ (add-hook 'completion-at-point-functions #'tempel-expand -1 'local))
+ ;; Put tempel-expand on the list whenever you start programming or
+ ;; writing prose.
+ (add-hook 'prog-mode-hook 'tempel-setup-capf)
+ (add-hook 'text-mode-hook 'tempel-setup-capf))
blob - /dev/null
blob + 2ff7dd4ba2b23bd60ef92cfa60f12c2b03677a62 (mode 644)
--- /dev/null
+++ .emacs.d/extras/email.el
+;;; Emacs Bedrock
+;;;
+;;; Extra config: Email
+
+;;; Usage: Append or require this file from init.el for Email in Emacs. You will
+;;; need to do some heavy customization depending on your email provider.
+
+;;; Contents:
+;;;
+;;; - Core Email Packages
+;;; - Sample Setup: Gmail
+;;; - Sample Setup: Fastmail
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;
+;;; Core Email Packages
+;;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;
+;;; Sample Setup: Gmail
+;;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;
+;;; Sample Setup: Fastmail
+;;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
blob - /dev/null
blob + ca56bf49265a080f65c2e9962180d6bc3fa99dd5 (mode 644)
--- /dev/null
+++ .emacs.d/extras/org-intro.txt
+Many people use Emacs just so they can use org-mode. If you're one of them,
+welcome!
+
+This is a short introduction to get an overview of what org-mode does.
+
+Org-mode is hard to understand because there are broadly three different things
+that org-mode does. They're related but distinct enough to make things
+confusing. We'll focus on three different use cases for org-mode:
+
+ - org-mode as markup
+ - org-mode as a task tracker
+ - org-mode as a computational notebook
+
+Org-mode as markup
+==================
+
+Org-mode is first and foremost a lightweight markup language, just like
+Markdown. (In fact, they were developed at around the same time.) There are a
+few differences in syntax, but if you're already familiar with the ideas behind
+Markdown you should be just fine.
+
+If you've never worked with something like Markdown before, you can think of it
+as a system of special characters that indicate some formatting, e.g. you mark
+text as being *bold*, _underlined_, or /italicized/ by surrounding it with
+asterisks, underscores, and slashes respectively.
+
+Once you've authored a file with org-mode, you can use Emacs to export the
+org-mode into another format, like HTML, Markdown, ODT, or PDF with LaTeX. Run
+`org-export` to bring up the export menu.
+
+Org-mode as a task tracker
+==========================
+
+Like Markdown, org-mode has headings. Instead of starting headings with one or
+more "#" signs, org-mode uses asterisks. An org mode heading looks like this:
+
+ * Heading
+
+ Lorem ipsum…
+
+ ** Subheading
+
+ Dolor sit amet…
+
+ ** Another subheading
+
+ Magister Ludi…
+
+ * Another top-level heading
+
+ Quam elivit…
+
+*Any* heading can become a task. This might feel overwhelming, and rightly so.
+For now, just start with a list of top-level headings with the TODO keyword.
+
+ * TODO Do important thing
+ * TODO Take Yessica to get her haircut
+ * TODO Finish configuring Emacs
+
+You can associate deadlines, notes, tags, attachments, different TODO states,
+etc. to these headlines. Read the org-mode manual for more information.
+
+While there are cases when you might want to put a TODO item in an arbitrary
+file, most of the time these TODOs will go into an agenda file.
+
+The `org-directory` and `org-agenda-files` variables control where org-mode
+looks to find TODO items to generate what's called an agenda: an agenda is a
+view of all your headlines with TODO (or other states like WAITING, as
+configured) status set. The agenda usually organizes these by date and makes it
+easy for you to sort, filter, and modify these items.
+
+For now, just start with one org-mode file at `~/Documents/org/inbox.org`. Put
+some headings with TODO keywords in that file and save it. Be sure to add a
+deadline for today. (You can run `org-deadline` to do this automatically for
+you.) Now invoke `org-agenda`. This should pull up a buffer with those headlines
+you just added in it.
+
+There are too many ways you can configure this for me to describe here. Just
+start small: have one or two files in the `org-agenda-files` list to act as
+where you put your TODO items. Use the agenda to view and modify those TODOs.
+
+Org-mode as a computational notebook
+====================================
+
+You can use org-mode as a kind of computational notebook. Org-mode lets you have
+blocks of source code in line, and then you can instruct org-mode to evaluate
+those blocks of code for you.
+
+The setup varies from language to language, and I'm not going to try to explain
+that here. If you're writing code, you should be familiar with reading
+documentation, so I'll let you do that yourself. :)
blob - /dev/null
blob + 8f8db712d97722321d6a767e9a345f4d893d94e4 (mode 644)
--- /dev/null
+++ .emacs.d/extras/org.el
+;;; Emacs Bedrock
+;;;
+;;; Extra config: Org-mode starter config
+
+;;; Usage: Append or require this file from init.el for some software
+;;; development-focused packages.
+;;;
+;;; Org-mode is a fantastically powerful package. It does a lot of things, which
+;;; makes it a little difficult to understand at first.
+;;;
+;;; We will configure Org-mode in phases. Work with each phase as you are
+;;; comfortable.
+;;;
+;;; YOU NEED TO CONFIGURE SOME VARIABLES! The most important variable is the
+;;; `org-directory', which tells org-mode where to look to find your agenda
+;;; files.
+
+;;; See "org-intro.txt" for a high-level overview.
+
+;;; Contents:
+;;;
+;;; - Critical variables
+;;; - Phase 1: editing and exporting files
+;;; - Phase 2: todos, agenda generation, and task tracking
+;;; - Phase 3: extensions (org-roam, etc.)
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;
+;;; Critical variables
+;;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+;;; These variables need to be set for Org-mode's full power to be unlocked!
+;;;
+;;; You can read the documentation for any variable with `C-h v'. If you have
+;;; Consult configured (see the `base.el' file) then it should help you find
+;;; what you're looking for.
+
+;;; Phase 1 variables
+
+;;; Phase 2 variables
+
+;; Agenda variables
+(setq org-directory "~/Documents/org/") ; Non-absolute paths for agenda and
+ ; capture templates will look here.
+
+(setq org-agenda-files '("inbox.org" "work.org"))
+
+;; Default tags
+(setq org-tag-alist '(
+ ;; locale
+ (:startgroup)
+ ("home" . ?h)
+ ("work" . ?w)
+ ("school" . ?s)
+ (:endgroup)
+ (:newline)
+ ;; scale
+ (:startgroup)
+ ("one-shot" . ?o)
+ ("project" . ?j)
+ ("tiny" . ?t)
+ (:endgroup)
+ ;; misc
+ ("meta")
+ ("review")
+ ("reading")))
+
+;; Org-refile: where should org-refile look?
+(setq org-refile-targets 'FIXME)
+
+;;; Phase 3 variables
+
+;; Org-roam variables
+(setq org-roam-directory "~/Documents/org-roam/")
+(setq org-roam-index-file "~/Documents/org-roam/index.org")
+
+;;; Optional variables
+
+;; Advanced: Custom link types
+;; This example is for linking a person's 7-character ID to their page on the
+;; free genealogy website Family Search.
+(setq org-link-abbrev-alist
+ '(("family_search" . "https://www.familysearch.org/tree/person/details/%s")))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;
+;;; Phase 1: editing and exporting files
+;;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+(use-package org
+ :hook ((org-mode . visual-line-mode) ; wrap lines at word breaks
+ (org-mode . flyspell-mode)) ; spell checking!
+
+ :bind (:map global-map
+ ("C-c l s" . org-store-link) ; Mnemonic: link → store
+ ("C-c l i" . org-insert-link-global)) ; Mnemonic: link → insert
+ :config
+ (require 'oc-csl) ; citation support
+ (add-to-list 'org-export-backends 'md)
+
+ ;; Make org-open-at-point follow file links in the same window
+ (setf (cdr (assoc 'file org-link-frame-setup)) 'find-file)
+
+ ;; Make exporting quotes better
+ (setq org-export-with-smart-quotes t)
+ )
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;
+;;; Phase 2: todos, agenda generation, and task tracking
+;;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+;; Yes, you can have multiple use-package declarations. It's best if their
+;; configs don't overlap. Once you've reached Phase 2, I'd recommend merging the
+;; config from Phase 1. I've broken it up here for the sake of clarity.
+(use-package org
+ :config
+ ;; Instead of just two states (TODO, DONE) we set up a few different states
+ ;; that a task can be in. Run
+ ;; M-x describe-variable RET org-todo-keywords RET
+ ;; for documentation on how these keywords work.
+ (setq org-todo-keywords
+ '((sequence "TODO(t)" "WAITING(w@/!)" "STARTED(s!)" "|" "DONE(d!)" "OBSOLETE(o@)")))
+
+ ;; Refile configuration
+ (setq org-outline-path-complete-in-steps nil)
+ (setq org-refile-use-outline-path 'file)
+
+ (setq org-capture-templates
+ '(("c" "Default Capture" entry (file "inbox.org")
+ "* TODO %?\n%U\n%i")
+ ;; Capture and keep an org-link to the thing we're currently working with
+ ("r" "Capture with Reference" entry (file "inbox.org")
+ "* TODO %?\n%U\n%i\n%a")
+ ;; Define a section
+ ("w" "Work")
+ ("wm" "Work meeting" entry (file+headline "work.org" "Meetings")
+ "** TODO %?\n%U\n%i\n%a")
+ ("wr" "Work report" entry (file+headline "work.org" "Reports")
+ "** TODO %?\n%U\n%i\n%a")))
+
+ ;; An agenda view lets you see your TODO items filtered and
+ ;; formatted in different ways. You can have multiple agenda views;
+ ;; please see the org-mode documentation for more information.
+ (setq org-agenda-custom-commands
+ '(("n" "Agenda and All Todos"
+ ((agenda)
+ (todo)))
+ ("w" "Work" agenda ""
+ ((org-agenda-files '("work.org")))))))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;
+;;; Phase 3: extensions
+;;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+;; TODO
blob - /dev/null
blob + 132215ca21cf355575f7146b723d72644095d008 (mode 644)
--- /dev/null
+++ .emacs.d/extras/researcher.el
+;;; Emacs Bedrock
+;;;
+;;; Extra config: Researcher
+
+;;; Usage: Append or require this file from init.el for research
+;;; helps. If you write papers in LaTeX and need to manage your
+;;; citations or keep track of notes, this set of packages is for you.
+;;;
+;;; Denote is a note taking package that facilitates a Zettelkasten
+;;; method. Denote works by enforcing a particular file naming
+;;; strategy. This makes it easy to link and tag notes.
+;;;
+;;; NOTE: the Citar package lives on the MELPA repository; you will
+;;; need to update the `package-archives' variable in init.el before
+;;; before loading this; see the comment in init.el under "Package
+;;; initialization".
+;;;
+;;; Highly recommended to enable this file with the UI enhancements in
+;;; `base.el', as Citar works best with the Vertico completing-read
+;;; interface. Also recommended is the `writer.el' extra config, which
+;;; adds some nice features for spell-checking etc.
+
+;;; Contents:
+;;;
+;;; - Citation Management
+;;; - Note Taking: Denote
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;
+;;; Critical variables
+;;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+;;; These variables must be set for Citar to work properly!
+
+(setopt citar-bibliography '("~/refs.bib")) ; paths to your bibtex files
+
+;;; These variables are needed for Denote
+(setopt denote-directory (expand-file-name "~/Documents/notes/"))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;
+;;; Citation Management
+;;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+(use-package citar
+ :ensure t
+ :bind (("C-c b" . citar-insert-citation)
+ :map minibuffer-local-map
+ ("M-b" . citar-insert-preset))
+ :custom
+ ;; Allows you to customize what citar-open does
+ (citar-file-open-functions '(("html" . citar-file-open-external)
+ ;; ("pdf" . citar-file-open-external)
+ (t . find-file))))
+
+;; Optional: if you have the embark package installed, enable the ability to act
+;; on citations with Citar by invoking `embark-act'.
+;(use-package citar-embark
+; :after citar embark
+; :diminish ""
+; :no-require
+; :config (citar-embark-mode))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;
+;;; Note Taking: Denote
+;;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+;; Denote is a simple but powerful note-taking system that relies on a
+;; file-naming schema to make searching and finding notes easily. The
+;; Denote package provides commands that make the note taking scheme
+;; easy to follow. See the manual at:
+;;
+;; https://protesilaos.com/emacs/denote
+;;
+(use-package denote
+ :config
+ (denote-rename-buffer-mode)
+ (require 'denote-journal-extras))
+
+;; Integrate citar and Denote: take notes on bibliographic entries
+;; through Denote
+(use-package citar-denote
+ :after (:any citar denote)
+ :custom
+ (citar-denote-file-type 'org)
+ (citar-denote-keyword "bib")
+ (citar-denote-signature nil)
+ (citar-denote-subdir "")
+ (citar-denote-template nil)
+ (citar-denote-title-format "title")
+ (citar-denote-title-format-andstr "and")
+ (citar-denote-title-format-authors 1)
+ (citar-denote-use-bib-keywords t)
+ :init
+ (citar-denote-mode))
blob - /dev/null
blob + d6a8db6dc1d4f745ebe81c51d3cf0c3962231715 (mode 644)
--- /dev/null
+++ .emacs.d/extras/vim-like.el
+;;; Emacs Bedrock
+;;;
+;;; Extra config: Vim emulation
+
+;;; Usage: Append or require this file from init.el for bindings in Emacs.
+
+;;; Contents:
+;;;
+;;; - Core Packages
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;
+;;; Core Packages
+;;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+;; Evil: vi emulation
+(use-package evil
+ :ensure t
+
+ :init
+ (setq evil-respect-visual-line-mode t)
+ (setq evil-undo-system 'undo-redo)
+
+ ;; Enable this if you want C-u to scroll up, more like pure Vim
+ ;(setq evil-want-C-u-scroll t)
+
+ :config
+ (evil-mode)
+
+ ;; If you use Magit, start editing in insert state
+ (add-hook 'git-commit-setup-hook 'evil-insert-state)
+
+ ;; Configuring initial major mode for some modes
+ (evil-set-initial-state 'eat-mode 'emacs)
+ (evil-set-initial-state 'vterm-mode 'emacs))
blob - /dev/null
blob + 9f2be5f3205225cf8ae743f76924d76c58e78644 (mode 644)
--- /dev/null
+++ .emacs.d/extras/writer.el
+;;; Emacs Bedrock
+;;;
+;;; Extra config: Writer
+
+;;; Usage: Append or require this file from init.el for writing aids.
+;;;
+;;; Jinx is a spell-checking package that is performant and flexible.
+;;; You can use Jinx inside of programming modes and it will only
+;;; check spelling inside of strings and comments. (Configurable, of
+;;; course.) It also supports having multiple languages (e.g. English
+;;; and German) in the same file.
+;;;
+;;; Olivetti narrows the window margins so that your text is centered.
+;;; This makes writing in a wide, dedicated window more pleasant.
+;;;
+;;; NOTE: the Olivetti package lives on the MELPA repository; you will
+;;; need to update the `package-archives' variable in init.el before
+;;; before loading this file; see the comment in init.el under
+;;; "Package initialization".
+
+;;; Contents:
+;;;
+;;; - Spell checking
+;;; - Dictionary
+;;; - Distraction mitigation
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;
+;;; General prose-friendly behavior
+;;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+(when (>= emacs-major-version 30) ; compat test
+ (add-hook 'text-mode-hook 'visual-wrap-prefix-mode))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;
+;;; Spell checking
+;;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+;; Jinx: Enchanted spell-checking
+(use-package jinx
+ :ensure t
+ :hook (((text-mode prog-mode) . jinx-mode))
+ :bind (("C-;" . jinx-correct))
+ :custom
+ (jinx-camel-modes '(prog-mode))
+ (jinx-delay 0.01))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;
+;;; Dictionary
+;;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+(setopt dictionary-use-single-buffer t)
+(setopt dictionary-server "dict.org")
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;
+;;; Distraction mitigation
+;;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+;; Olivetti: Set the window margins so your text is centered
+(use-package olivetti
+ :ensure t
+ ;; Uncomment below to make olivetti-mode turn on automatically in certain modes
+ ; :hook ((markdown-mode . olivetti-mode))
+ )
blob - /dev/null
blob + 90da61f21993d746333d12bf60b60c88dd13f896 (mode 644)
--- /dev/null
+++ .emacs.d/init.el
+;;; Minimal init.el
+
+;;; Contents:
+;;;
+;;; - Basic settings
+;;; - Discovery aids
+;;; - Minibuffer/completion settings
+;;; - Interface enhancements/defaults
+;;; - Tab-bar configuration
+;;; - Theme
+;;; - Optional extras
+;;; - Built-in customization framework
+
+;;; Guardrail
+
+(when (< emacs-major-version 29)
+ (error "Emacs Bedrock only works with Emacs 29 and newer; you have version %s" emacs-major-version))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;
+;;; Basic settings
+;;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+;; Package initialization
+;;
+;; We'll stick to the built-in GNU and non-GNU ELPAs (Emacs Lisp Package
+;; Archive) for the base install, but there are some other ELPAs you could look
+;; at if you want more packages. MELPA in particular is very popular. See
+;; instructions at:
+;;
+;; https://melpa.org/#/getting-started
+;;
+;; You can simply uncomment the following if you'd like to get started with
+;; MELPA packages quickly:
+;;
+(with-eval-after-load 'package
+ (add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t))
+
+;; If you want to turn off the welcome screen, uncomment this
+;(setopt inhibit-splash-screen t)
+
+(setopt initial-major-mode 'fundamental-mode) ; default mode for the *scratch* buffer
+(setopt display-time-default-load-average nil) ; this information is useless for most
+
+;; Automatically reread from disk if the underlying file changes
+(setopt auto-revert-avoid-polling t)
+;; Some systems don't do file notifications well; see
+;; https://todo.sr.ht/~ashton314/emacs-bedrock/11
+(setopt auto-revert-interval 5)
+(setopt auto-revert-check-vc-info t)
+(global-auto-revert-mode)
+
+;; Save history of minibuffer
+(savehist-mode)
+
+;; Move through windows with Ctrl-<arrow keys>
+(windmove-default-keybindings 'control) ; You can use other modifiers here
+
+;; Fix archaic defaults
+(setopt sentence-end-double-space nil)
+
+;; Make right-click do something sensible
+(when (display-graphic-p)
+ (context-menu-mode))
+
+;; Don't litter file system with *~ backup files; put them all inside
+;; ~/.emacs.d/backup or wherever
+(defun bedrock--backup-file-name (fpath)
+ "Return a new file path of a given file path.
+If the new path's directories does not exist, create them."
+ (let* ((backupRootDir (concat user-emacs-directory "emacs-backup/"))
+ (filePath (replace-regexp-in-string "[A-Za-z]:" "" fpath )) ; remove Windows driver letter in path
+ (backupFilePath (replace-regexp-in-string "//" "/" (concat backupRootDir filePath "~") )))
+ (make-directory (file-name-directory backupFilePath) (file-name-directory backupFilePath))
+ backupFilePath))
+(setopt make-backup-file-name-function 'bedrock--backup-file-name)
+
+;; The above creates nested directories in the backup folder. If
+;; instead you would like all backup files in a flat structure, albeit
+;; with their full paths concatenated into a filename, then you can
+;; use the following configuration:
+;; (Run `'M-x describe-variable RET backup-directory-alist RET' for more help)
+;;
+;; (let ((backup-dir (expand-file-name "emacs-backup/" user-emacs-directory)))
+;; (setopt backup-directory-alist `(("." . ,backup-dir))))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;
+;;; Discovery aids
+;;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+;; Show the help buffer after startup
+(add-hook 'after-init-hook 'help-quick)
+
+;; which-key: shows a popup of available keybindings when typing a long key
+;; sequence (e.g. C-x ...)
+(use-package which-key
+ :ensure t
+ :config
+ (which-key-mode))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;
+;;; Minibuffer/completion settings
+;;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+;; For help, see: https://www.masteringemacs.org/article/understanding-minibuffer-completion
+
+(setopt enable-recursive-minibuffers t) ; Use the minibuffer whilst in the minibuffer
+(setopt completion-cycle-threshold 1) ; TAB cycles candidates
+(setopt completions-detailed t) ; Show annotations
+(setopt tab-always-indent 'complete) ; When I hit TAB, try to complete, otherwise, indent
+(setopt completion-styles '(basic initials substring)) ; Different styles to match input to candidates
+
+(setopt completion-auto-help 'always) ; Open completion always; `lazy' another option
+(setopt completions-max-height 20) ; This is arbitrary
+(setopt completions-format 'one-column)
+(setopt completions-group t)
+(setopt completion-auto-select 'second-tab) ; Much more eager
+;(setopt completion-auto-select t) ; See `C-h v completion-auto-select' for more possible values
+
+(keymap-set minibuffer-mode-map "TAB" 'minibuffer-complete) ; TAB acts more like how it does in the shell
+
+;; For a fancier built-in completion option, try ido-mode,
+;; icomplete-vertical, or fido-mode. See also the file extras/base.el
+
+;(icomplete-vertical-mode)
+;(fido-vertical-mode)
+;(setopt icomplete-delay-completions-threshold 4000)
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;
+;;; Interface enhancements/defaults
+;;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+;; Mode line information
+(setopt line-number-mode t) ; Show current line in modeline
+(setopt column-number-mode t) ; Show column as well
+
+(setopt x-underline-at-descent-line nil) ; Prettier underlines
+(setopt switch-to-buffer-obey-display-actions t) ; Make switching buffers more consistent
+
+(setopt show-trailing-whitespace nil) ; By default, don't underline trailing spaces
+(setopt indicate-buffer-boundaries 'left) ; Show buffer top and bottom in the margin
+
+;; Enable horizontal scrolling
+(setopt mouse-wheel-tilt-scroll t)
+(setopt mouse-wheel-flip-direction t)
+
+;; We won't set these, but they're good to know about
+;;
+;; (setopt indent-tabs-mode nil)
+;; (setopt tab-width 4)
+
+;; Misc. UI tweaks
+(blink-cursor-mode -1) ; Steady cursor
+(pixel-scroll-precision-mode) ; Smooth scrolling
+
+;; Use common keystrokes by default
+;(cua-mode)
+
+;; For terminal users, make the mouse more useful
+
+(xterm-mouse-mode 1)
+
+;; Display line numbers in programming mode
+(add-hook 'prog-mode-hook 'display-line-numbers-mode)
+(setopt display-line-numbers-width 3) ; Set a minimum width
+
+;; Nice line wrapping when working with text
+(add-hook 'text-mode-hook 'visual-line-mode)
+
+;; Modes to highlight the current line with
+(let ((hl-line-hooks '(text-mode-hook prog-mode-hook)))
+ (mapc (lambda (hook) (add-hook hook 'hl-line-mode)) hl-line-hooks))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;
+;;; Tab-bar configuration
+;;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+;; Show the tab-bar as soon as tab-bar functions are invoked
+(setopt tab-bar-show 1)
+
+;; Add the time to the tab-bar, if visible
+(add-to-list 'tab-bar-format 'tab-bar-format-align-right 'append)
+(add-to-list 'tab-bar-format 'tab-bar-format-global 'append)
+(setopt display-time-format "%a %F %T")
+(setopt display-time-interval 1)
+(display-time-mode)
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;
+;;; Theme
+;;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+(load-theme 'bsd-dark t)
+
+;; (use-package stimmung-themes
+;; :ensure t)
+
+;; (use-package auto-dark
+;; :ensure t
+;; :custom
+;; (auto-dark-dark-theme 'stimmung-themes-dark)
+;; (auto-dark-light-theme 'stimmung-themes-light)
+;; :config
+;; (auto-dark-mode t))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;
+;;; Optional extras
+;;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+;; Uncomment the (load-file …) lines or copy code from the extras/ elisp files
+;; as desired
+
+;; UI/UX enhancements mostly focused on minibuffer and autocompletion interfaces
+;; These ones are *strongly* recommended!
+(load-file (expand-file-name "extras/base.el" user-emacs-directory))
+
+;; Packages for software development
+(load-file (expand-file-name "extras/dev.el" user-emacs-directory))
+
+;; Vim-bindings in Emacs (evil-mode configuration)
+;(load-file (expand-file-name "extras/vim-like.el" user-emacs-directory))
+
+;; Org-mode configuration
+;; WARNING: need to customize things inside the elisp file before use! See
+;; the file extras/org-intro.txt for help.
+;(load-file (expand-file-name "extras/org.el" user-emacs-directory))
+
+;; Email configuration in Emacs
+;; WARNING: needs the `mu' program installed; see the elisp file for more
+;; details.
+(load-file (expand-file-name "extras/email.el" user-emacs-directory))
+
+;; Tools for academic researchers
+;(load-file (expand-file-name "extras/researcher.el" user-emacs-directory))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;
+;;; Built-in customization framework
+;;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+(custom-set-variables
+ ;; custom-set-variables was added by Custom.
+ ;; If you edit it by hand, you could mess it up, so be careful.
+ ;; Your init file should contain only one such instance.
+ ;; If there is more than one, they won't work right.
+ '(custom-safe-themes
+ '("d3fc453759c879c1dc857fe4afcfe6cc2336b299d3aeef2cb309d049b85a2396"
+ default))
+ '(inhibit-startup-screen t)
+ '(package-selected-packages nil))
+(custom-set-faces
+ ;; custom-set-faces was added by Custom.
+ ;; If you edit it by hand, you could mess it up, so be careful.
+ ;; Your init file should contain only one such instance.
+ ;; If there is more than one, they won't work right.
+ '(help-key-binding ((t (:background "#000000" :foreground "#CC9528" :family "Comic Code")))))
+
+(setq gc-cons-threshold (or bedrock--initial-gc-threshold 800000))
+