cmc/dotfiles

Using GNU Stow to manage my dotfiles. config dotfiles macos stow

Commit f02fc35ba5

f02fc35ba5b7d4cb989ab2c8739ded9c18fd9304

parent: 6c627ad5df

Unregistered key

cmc <hello@cmc.pub> 路 2025-03-15 02:49 UTC

add doom emacs dotfiles

Layout: unified 路 split

.config/doom/config.el added +160
@@ -0,0 +1,160 @@
1;;; $DOOMDIR/config.el -*- lexical-binding: t; -*-
2
3;; Place your private configuration here! Remember, you do not need to run 'doom
4;; sync' after modifying this file!
5
6
7;; Some functionality uses this to identify you, e.g. GPG configuration, email
8;; clients, file templates and snippets. It is optional.
9(setq user-full-name "Christian Cleberg"
10 user-mail-address "hello@cmc.pub")
11
12;; Doom exposes five (optional) variables for controlling fonts in Doom:
13;;
14;; - `doom-font' -- the primary font to use
15;; - `doom-variable-pitch-font' -- a non-monospace font (where applicable)
16;; - `doom-big-font' -- used for `doom-big-font-mode'; use this for
17;; presentations or streaming.
18;; - `doom-symbol-font' -- for symbols
19;; - `doom-serif-font' -- for the `fixed-pitch-serif' face
20;;
21;; See 'C-h v doom-font' for documentation and more examples of what they
22;; accept. For example:
23;;
24;;(setq doom-font (font-spec :family "Fira Code" :size 12 :weight 'semi-light)
25;; doom-variable-pitch-font (font-spec :family "Fira Sans" :size 13))
26;;
27;; If you or Emacs can't find your font, use 'M-x describe-font' to look them
28;; up, `M-x eval-region' to execute elisp code, and 'M-x doom/reload-font' to
29;; refresh your font settings. If Emacs still can't find your font, it likely
30;; wasn't installed correctly. Font issues are rarely Doom issues!
31
32;; There are two ways to load a theme. Both assume the theme is installed and
33;; available. You can either set `doom-theme' or manually load a theme with the
34;; `load-theme' function. This is the default:
35(setq doom-theme 'doom-one)
36
37;; This determines the style of line numbers in effect. If set to `nil', line
38;; numbers are disabled. For relative line numbers, set this to `relative'.
39(setq display-line-numbers-type t)
40
41;; If you use `org' and don't want your org files in the default location below,
42;; change `org-directory'. It must be set before org loads!
43(setq org-directory "~/org/")
44
45
46;; Whenever you reconfigure a package, make sure to wrap your config in an
47;; `after!' block, otherwise Doom's defaults may override your settings. E.g.
48;;
49;; (after! PACKAGE
50;; (setq x y))
51;;
52;; The exceptions to this rule:
53;;
54;; - Setting file/directory variables (like `org-directory')
55;; - Setting variables which explicitly tell you to set them before their
56;; package is loaded (see 'C-h v VARIABLE' to look up their documentation).
57;; - Setting doom variables (which start with 'doom-' or '+').
58;;
59;; Here are some additional functions/macros that will help you configure Doom.
60;;
61;; - `load!' for loading external *.el files relative to this one
62;; - `use-package!' for configuring packages
63;; - `after!' for running code after a package has loaded
64;; - `add-load-path!' for adding directories to the `load-path', relative to
65;; this file. Emacs searches the `load-path' when you load packages with
66;; `require' or `use-package'.
67;; - `map!' for binding new keys
68;;
69;; To get information about any of these functions/macros, move the cursor over
70;; the highlighted symbol at press 'K' (non-evil users must press 'C-c c k').
71;; This will open documentation for it, including demos of how they are used.
72;; Alternatively, use `C-h o' to look up a symbol (functions, variables, faces,
73;; etc).
74;;
75;; You can also try 'gd' (or 'C-c c d') to jump to their definition and see how
76;; they are implemented.
77
78;; load packages and programs
79;; (use-package mu4e
80;; :load-path "/Users/cmc/.config/emacs/modules/email/mu4e/")
81;; (require 'smtpmail)
82;; (setq mu4e-mu-binary (executable-find "mu"))
83
84;; set base directory
85;; (setq mu4e-maildir "~/.maildir")
86
87;; sync imap servers
88;; (setq mu4e-get-mail-command (concat (executable-find "mbsync") " -a"))
89
90;; how often to sync in seconds
91;; (setq mu4e-update-interval 300)
92
93;; save attachments to defined directory
94;; (setq mu4e-attachment-dir "~/Downloads")
95
96;; rename files when moving - needed for mbsync:
97;; (setq mu4e-change-filenames-when-moving t)
98
99;; list of your email adresses:
100;; (setq mu4e-user-mail-address-list '("hello@cmc.pub"))
101
102;; check your ~/.maildir to see naming of subdirectories
103;; (setq mu4e-maildir-shortcuts
104;; '(("/migadu/INBOX" . ?e)
105;; ("/migadu/Sent" . ?E)))
106
107;; (setq mu4e-contexts
108;; `(,(make-mu4e-context
109;; :name "migadu"
110;; :enter-func
111;; (lambda () (mu4e-message "Enter hello@cmc.pub context"))
112;; :leave-func
113;; (lambda () (mu4e-message "Leave hello@cmc.pub context"))
114;; :match-func
115;; (lambda (msg)
116;; (when msg
117;; (mu4e-message-contact-field-matches msg
118;; :to "hello@cmc.pub")))
119;; :vars '((user-mail-address . "hello@cmc.pub")
120;; (user-full-name . "Christian Cleberg")
121;; ;; check your ~/.maildir to see how the subdirectories are called
122;; ;; e.g `ls ~/.maildir/migadu'
123;; (mu4e-drafts-folder . "/migadu/Drafts")
124;; (mu4e-refile-folder . "/migadu/Archive")
125;; (mu4e-sent-folder . "/migadu/Sent")
126;; (mu4e-trash-folder . "/migadu/Trash")))))
127
128;; (setq mu4e-context-policy 'pick-first) ;; start with the first (default) context;
129;; (setq mu4e-compose-context-policy 'ask) ;; ask for context if no context matches;
130
131;; gpg encryptiom & decryption:
132;; this can be left alone
133;; (require 'epa-file)
134;; (epa-file-enable)
135;; (setq epa-pinentry-mode 'loopback)
136;; (auth-source-forget-all-cached)
137
138;; don't keep message compose buffers around after sending:
139;; (setq message-kill-buffer-on-exit t)
140
141;; send function:
142;; (setq send-mail-function 'sendmail-send-it
143;; message-send-mail-function 'sendmail-send-it)
144
145;; send program:
146;; (setq sendmail-program (executable-find "msmtp"))
147
148;; select the right sender email from the context.
149;; (setq message-sendmail-envelope-from 'header)
150
151;; mu4e cc & bcc
152;; (add-hook 'mu4e-compose-mode-hook
153;; (defun timu/add-cc-and-bcc ()
154;; "My Function to automatically add Cc & Bcc: headers.
155;; This is in the mu4e compose mode."
156;; (save-excursion (message-add-header "Cc:\n"))
157;; (save-excursion (message-add-header "Bcc:\n"))))
158
159;; mu4e address completion
160;; (add-hook 'mu4e-compose-mode-hook 'company-mode)
.config/doom/custom.el added +13
@@ -0,0 +1,13 @@
1(custom-set-variables
2 ;; custom-set-variables was added by Custom.
3 ;; If you edit it by hand, you could mess it up, so be careful.
4 ;; Your init file should contain only one such instance.
5 ;; If there is more than one, they won't work right.
6 '(custom-safe-themes
7 '("2771ec93656faf267521dce9ffe1a6ad88cd0bea87aa0e8c4fc80bf355c58c1d" default)))
8(custom-set-faces
9 ;; custom-set-faces was added by Custom.
10 ;; If you edit it by hand, you could mess it up, so be careful.
11 ;; Your init file should contain only one such instance.
12 ;; If there is more than one, they won't work right.
13 )
.config/doom/init.el added +193
@@ -0,0 +1,193 @@
1;;; init.el -*- lexical-binding: t; -*-
2
3;; This file controls what Doom modules are enabled and what order they load
4;; in. Remember to run 'doom sync' after modifying it!
5
6;; NOTE Press 'SPC h d h' (or 'C-h d h' for non-vim users) to access Doom's
7;; documentation. There you'll find a link to Doom's Module Index where all
8;; of our modules are listed, including what flags they support.
9
10;; NOTE Move your cursor over a module's name (or its flags) and press 'K' (or
11;; 'C-c c k' for non-vim users) to view its documentation. This works on
12;; flags as well (those symbols that start with a plus).
13;;
14;; Alternatively, press 'gd' (or 'C-c c d') on a module to browse its
15;; directory (for easy access to its source code).
16
17(doom! :input
18 ;;bidi ; (tfel ot) thgir etirw uoy gnipleh
19 ;;chinese
20 ;;japanese
21 ;;layout ; auie,ctsrnm is the superior home row
22
23 :completion
24 ;;company ; the ultimate code completion backend
25 (corfu +orderless) ; complete with cap(f), cape and a flying feather!
26 ;;helm ; the *other* search engine for love and life
27 ;;ido ; the other *other* search engine...
28 ;;ivy ; a search engine for love and life
29 vertico ; the search engine of the future
30
31 :ui
32 ;;deft ; notational velocity for Emacs
33 doom ; what makes DOOM look the way it does
34 doom-dashboard ; a nifty splash screen for Emacs
35 doom-quit ; DOOM quit-message prompts when you quit Emacs
36 (emoji +unicode) ; 馃檪
37 hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW
38 ;;indent-guides ; highlighted indent columns
39 ;;ligatures ; ligatures and symbols to make your code pretty again
40 ;;minimap ; show a map of the code on the side
41 modeline ; snazzy, Atom-inspired modeline, plus API
42 ;;nav-flash ; blink cursor line after big motions
43 ;;neotree ; a project drawer, like NERDTree for vim
44 ophints ; highlight the region an operation acts on
45 (popup +defaults) ; tame sudden yet inevitable temporary windows
46 ;;tabs ; a tab bar for Emacs
47 treemacs ; a project drawer, like neotree but cooler
48 ;;unicode ; extended unicode support for various languages
49 (vc-gutter +pretty) ; vcs diff in the fringe
50 vi-tilde-fringe ; fringe tildes to mark beyond EOB
51 ;;window-select ; visually switch windows
52 workspaces ; tab emulation, persistence & separate workspaces
53 ;;zen ; distraction-free coding or writing
54
55 :editor
56 (evil +everywhere); come to the dark side, we have cookies
57 file-templates ; auto-snippets for empty files
58 fold ; (nigh) universal code folding
59 ;;(format +onsave) ; automated prettiness
60 ;;god ; run Emacs commands without modifier keys
61 ;;lispy ; vim for lisp, for people who don't like vim
62 ;;multiple-cursors ; editing in many places at once
63 ;;objed ; text object editing for the innocent
64 ;;parinfer ; turn lisp into python, sort of
65 ;;rotate-text ; cycle region at point between text candidates
66 snippets ; my elves. They type so I don't have to
67 ;;word-wrap ; soft wrapping with language-aware indent
68
69 :emacs
70 dired ; making dired pretty [functional]
71 electric ; smarter, keyword-based electric-indent
72 eww ; the internet is gross
73 ;;ibuffer ; interactive buffer management
74 undo ; persistent, smarter undo for your inevitable mistakes
75 vc ; version-control and Emacs, sitting in a tree
76
77 :term
78 ;;eshell ; the elisp shell that works everywhere
79 ;;shell ; simple shell REPL for Emacs
80 ;;term ; basic terminal emulator for Emacs
81 ;;vterm ; the best terminal emulation in Emacs
82
83 :checkers
84 syntax ; tasing you for every semicolon you forget
85 (spell +flyspell) ; tasing you for misspelling mispelling
86 grammar ; tasing grammar mistake every you make
87
88 :tools
89 ;;ansible
90 ;;biblio ; Writes a PhD for you (citation needed)
91 ;;collab ; buffers with friends
92 ;;debugger ; FIXME stepping through code, to help you add bugs
93 ;;direnv
94 ;;docker
95 ;;editorconfig ; let someone else argue about tabs vs spaces
96 ;;ein ; tame Jupyter notebooks with emacs
97 (eval +overlay) ; run code, run (also, repls)
98 lookup ; navigate your code and its documentation
99 ;;lsp ; M-x vscode
100 magit ; a git porcelain for Emacs
101 ;;make ; run make tasks from Emacs
102 ;;pass ; password manager for nerds
103 ;;pdf ; pdf enhancements
104 ;;prodigy ; FIXME managing external services & code builders
105 ;;terraform ; infrastructure as code
106 ;;tmux ; an API for interacting with tmux
107 ;;tree-sitter ; syntax and parsing, sitting in a tree...
108 ;;upload ; map local to remote projects via ssh/ftp
109
110 :os
111 (:if (featurep :system 'macos) macos) ; improve compatibility with macOS
112 ;;tty ; improve the terminal Emacs experience
113
114 :lang
115 ;;agda ; types of types of types of types...
116 ;;beancount ; mind the GAAP
117 ;;(cc +lsp) ; C > C++ == 1
118 ;;clojure ; java with a lisp
119 ;;common-lisp ; if you've seen one lisp, you've seen them all
120 ;;coq ; proofs-as-programs
121 ;;crystal ; ruby at the speed of c
122 ;;csharp ; unity, .NET, and mono shenanigans
123 ;;data ; config/data formats
124 ;;(dart +flutter) ; paint ui and not much else
125 ;;dhall
126 ;;elixir ; erlang done right
127 ;;elm ; care for a cup of TEA?
128 emacs-lisp ; drown in parentheses
129 ;;erlang ; an elegant language for a more civilized age
130 ;;ess ; emacs speaks statistics
131 ;;factor
132 ;;faust ; dsp, but you get to keep your soul
133 ;;fortran ; in FORTRAN, GOD is REAL (unless declared INTEGER)
134 ;;fsharp ; ML stands for Microsoft's Language
135 ;;fstar ; (dependent) types and (monadic) effects and Z3
136 ;;gdscript ; the language you waited for
137 ;;(go +lsp) ; the hipster dialect
138 ;;(graphql +lsp) ; Give queries a REST
139 ;;(haskell +lsp) ; a language that's lazier than I am
140 ;;hy ; readability of scheme w/ speed of python
141 ;;idris ; a language you can depend on
142 ;;json ; At least it ain't XML
143 ;;(java +lsp) ; the poster child for carpal tunnel syndrome
144 javascript ; all(hope(abandon(ye(who(enter(here))))))
145 ;;julia ; a better, faster MATLAB
146 ;;kotlin ; a better, slicker Java(Script)
147 ;;latex ; writing papers in Emacs has never been so fun
148 ;;lean ; for folks with too much to prove
149 ;;ledger ; be audit you can be
150 ;;lua ; one-based indices? one-based indices
151 markdown ; writing docs for people to ignore
152 ;;nim ; python + lisp at the speed of c
153 ;;nix ; I hereby declare "nix geht mehr!"
154 ;;ocaml ; an objective camel
155 org ; organize your plain life in plain text
156 ;;php ; perl's insecure younger brother
157 ;;plantuml ; diagrams for confusing people more
158 ;;graphviz ; diagrams for confusing yourself even more
159 ;;purescript ; javascript, but functional
160 python ; beautiful is better than ugly
161 ;;qt ; the 'cutest' gui framework ever
162 ;;racket ; a DSL for DSLs
163 ;;raku ; the artist formerly known as perl6
164 ;;rest ; Emacs as a REST client
165 ;;rst ; ReST in peace
166 ;;(ruby +rails) ; 1.step {|i| p "Ruby is #{i.even? ? 'love' : 'life'}"}
167 ;;(rust +lsp) ; Fe2O3.unwrap().unwrap().unwrap().unwrap()
168 ;;scala ; java, but good
169 ;;(scheme +guile) ; a fully conniving family of lisps
170 sh ; she sells {ba,z,fi}sh shells on the C xor
171 ;;sml
172 ;;solidity ; do you need a blockchain? No.
173 ;;swift ; who asked for emoji variables?
174 ;;terra ; Earth and Moon in alignment for performance.
175 ;;web ; the tubes
176 ;;yaml ; JSON, but readable
177 ;;zig ; C, but simpler
178
179 :email
180 (mu4e +org)
181 ;;notmuch
182 ;;(wanderlust +gmail)
183
184 :app
185 ;;calendar
186 ;;emms
187 ;;everywhere ; *leave* Emacs!? You must be joking
188 ;;irc ; how neckbeards socialize
189 ;;(rss +org) ; emacs as an RSS reader
190
191 :config
192 ;;literate
193 (default +bindings +smartparens))
.config/doom/packages.el added +52
@@ -0,0 +1,52 @@
1;; -*- no-byte-compile: t; -*-
2;;; $DOOMDIR/packages.el
3
4;; To install a package with Doom you must declare them here and run 'doom sync'
5;; on the command line, then restart Emacs for the changes to take effect -- or
6
7
8;; To install SOME-PACKAGE from MELPA, ELPA or emacsmirror:
9;; (package! some-package)
10(package! htmlize)
11(package! templatel)
12(package! weblorg)
13
14;; To install a package directly from a remote git repo, you must specify a
15;; `:recipe'. You'll find documentation on what `:recipe' accepts here:
16;; https://github.com/radian-software/straight.el#the-recipe-format
17;; (package! another-package
18;; :recipe (:host github :repo "username/repo"))
19
20;; If the package you are trying to install does not contain a PACKAGENAME.el
21;; file, or is located in a subdirectory of the repo, you'll need to specify
22;; `:files' in the `:recipe':
23;; (package! this-package
24;; :recipe (:host github :repo "username/repo"
25;; :files ("some-file.el" "src/lisp/*.el")))
26
27;; If you'd like to disable a package included with Doom, you can do so here
28;; with the `:disable' property:
29;; (package! builtin-package :disable t)
30
31;; You can override the recipe of a built in package without having to specify
32;; all the properties for `:recipe'. These will inherit the rest of its recipe
33;; from Doom or MELPA/ELPA/Emacsmirror:
34;; (package! builtin-package :recipe (:nonrecursive t))
35;; (package! builtin-package-2 :recipe (:repo "myfork/package"))
36
37;; Specify a `:branch' to install a package from a particular branch or tag.
38;; This is required for some packages whose default branch isn't 'master' (which
39;; our package manager can't deal with; see radian-software/straight.el#279)
40;; (package! builtin-package :recipe (:branch "develop"))
41
42;; Use `:pin' to specify a particular commit to install.
43;; (package! builtin-package :pin "1a2b3c4d5e")
44
45
46;; Doom's packages are pinned to a specific commit and updated from release to
47;; release. The `unpin!' macro allows you to unpin single packages...
48;; (unpin! pinned-package)
49;; ...or multiple packages
50;; (unpin! pinned-package another-pinned-package)
51;; ...Or *all* packages (NOT RECOMMENDED; will likely break things)
52;; (unpin! t)