My Emacs configuration using Crafted Emacs
  • Emacs Lisp 95.3%
  • YASnippet 4.7%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-11-10 00:57:56 +01:00
composable-prompts add full python prompt 2025-08-14 11:47:52 +02:00
modules feat: add work-in-progress JSON schema authoring 2026-11-09 23:59:33 +01:00
prompts added project management and enabled prompt mgt 2025-08-14 11:46:18 +02:00
snippets feat: add owner roster Yasnippet draft 2026-11-10 00:57:56 +01:00
system-prompts add prompts for gptel et al... 2025-08-13 17:27:26 +02:00
tests feat: add owner roster Yasnippet draft 2026-11-10 00:57:56 +01:00
.gitignore Move private Emacs metadata to encrypted overlay 2026-07-23 22:51:55 +02:00
AIPIHKAL.org add prompts for gptel et al... 2025-08-13 17:27:26 +02:00
early-init.el limit native comp jobs on emacsy 2026-09-28 11:11:15 +00:00
init.org feat: add work-in-progress JSON schema authoring 2026-11-09 23:59:33 +01:00
org-generate.org improve lisp experience 2024-12-18 11:45:08 +01:00
org-mode-syntax-cheat-sheet-for-llms.txt add org cheat sheet 2025-08-13 13:23:13 +02:00
PLANNING.org added project management and enabled prompt mgt 2025-08-14 11:46:18 +02:00
private.el.gpg migrate from znc to soju 2026-09-01 13:53:33 +02:00
private.example.el Move private Emacs metadata to encrypted overlay 2026-07-23 22:51:55 +02:00
README.org feat: add owner roster Yasnippet draft 2026-11-10 00:57:56 +01:00
TASK.org added project management and enabled prompt mgt 2025-08-14 11:46:18 +02:00
the-one-true-holy-and-apostolic-coding-and-tool-usage-prompt.org add prompts for gptel et al... 2025-08-13 17:27:26 +02:00

Emacs Configuration

I finally decided that keeping my Emacs configuration together with all the other common configuration files comes close to blasphemy so I split it from the main dotfiles repo.

Seriously managing emacs through symlinks works but in the spirit of less is more just doing a

git clone forgejo@forge.snamellit.com:pti/emacs-config ~/.config/emacs

And then maintaining the files directly over there is easier than it being part of all the other stuff.

Of course easier is in the eye of the beholder at the time of observation. In practice it are all diffferent trade-offs. I think this setup will also make it easier to package up my emacs config as a GUIX package for distribution over my PCs.

Many thanks to the Crafted Emacs team which allowed me to bootstrap my configuration and enabled me to bootstrap my standalone configuration.

JSON schema-assisted authoring

The lang-json module starts Eglot in JSON buffers when the JSON language server is installed. This server only advertises completion to clients with snippet support, so the existing Yasnippet installation must be available when the buffer opens. Install the server into ~/.local/bin:

npm install --global --prefix "$HOME/.local" --ignore-scripts --no-audit --no-fund vscode-langservers-extracted@4.10.0

Ensure ~/.local/bin is in Emacs's exec-path (evaluate M-: (executable-find "vscode-json-language-server") RET). Restart Emacs after installing; the configuration already imports the GUI shell path after startup.

To author owner-roster documents, keep a local checkout at ~/infrastructure-asset-register (or customize snm/json-roster-schema-directory before Eglot loads). Name the draft SOURCE.roster.json and its detached manifest SOURCE.roster.manifest.json. The module embeds the corresponding local schemas in the language-server settings for these filename patterns; other JSON files are not assigned a roster schema. Completion provides schema-defined property names and values without inserting $schema into the strict snapshot. The json-ts-mode snippet snippets/json-ts-mode/owner-roster-v1 provides a draft skeleton: in a JSON buffer type owner-roster-v1 and expand it with Yasnippet, or select it via M-x yas-insert-snippet. Run M-x yas-reload-all if Emacs was already open when the snippet was added. The source revision defaults to an export shape; replace it with the Git shape when appropriate. Its digest/date placeholders and all seven REVIEW coverage statuses are intentionally invalid until you replace them with owner-reviewed facts and fill any required failure or unsupported-portion lists. Empty claims are not evidence of absence. These settings assist writing only: the repo's offline validator and source-owner attestation remain necessary before submission.

From the config checkout, the isolated checks are:

EMACS_TEST_ROOT="$PWD" ASSET_REGISTER_ROOT="$HOME/infrastructure-asset-register" \
  emacs --batch -Q -l tests/lang-json-tests.el -f ert-run-tests-batch-and-exit
EMACS_TEST_ROOT="$PWD" emacs --batch -Q \
  -L "$HOME/.config/emacs/elpaca/builds/yasnippet" \
  -l tests/lang-json-snippet-tests.el -f ert-run-tests-batch-and-exit

The live probe connects to the server with the installed Yasnippet package:

EMACS_TEST_ROOT="$PWD" emacs --batch -Q \
  -L "$HOME/.config/emacs/elpaca/builds/yasnippet" \
  -l tests/lang-json-live-smoke.el

Known unfinished behavior: schema_version completion works for SOURCE.roster.json, but the probe currently receives no manifest_version completion in SOURCE.roster.manifest.json even though Eglot manages that buffer. This is a work-in-progress configuration.