Fold list-callout into markdown plugin #58

Closed
opened 2026-05-21 09:40:03 +00:00 by steve · 0 comments
Owner

Move inline list-callout behavior from the colocated Obsidian-targeted
plugin-list-callout package into @lapis-notes/markdown, migrate settings,
and remove the standalone package.

Context

packages/plugins/plugin-list-callout (manifest id obsidian-list-callouts) decorates
markdown list items with inline callout markers in source (CodeMirror) and reading/preview
(DOM post-processor). It depends on the obsidian package and is not registered in
workspace bootstrap.ts core plugins, so it never loads in Lapis today.

List callouts belong with markdown editing/rendering, which already owns list preview via
ListItem.svelte and invokes registered markdown post-processors from
markdown-preview.svelte.

Planned module layout under markdown:

  • src/lib/list-callout/extension.ts — CM6 decorations
  • src/lib/list-callout/post-processor.ts — preview DOM pass (sort order 10000)
  • src/lib/list-callout/settings.ts — types, defaults, config builders
  • src/lib/list-callout/settings-tab.ts — callout catalog UI (custom tab)
  • src/lib/list-callout/list-callout.css — moved from standalone styles.css
  • src/lib/list-callout/config.schema.json — declarative style sliders
  • src/lib/list-callout/apply-style-vars.ts — sync config → --lc-* CSS variables
  • src/lib/list-callout/migrate-settings.ts — legacy import

Settings split:

  1. Callout catalog (char, RGB color, optional icon, custom entries): custom plugin
    settings tab; persist in /.obsidian/markdown.json as { listCallouts: Callout[] }.
  2. Style tuning (opacity, padding — former Obsidian Style Settings): declarative
    markdown.listCallouts.style.* configuration schema with range controls.

Migration: import /.obsidian/plugins/obsidian-list-callouts/data.json when markdown has
no listCallouts yet; prune obsidian-list-callouts from community-plugins.json if
present. Style Settings values cannot be auto-migrated (defaults via schema).

Out of scope: rehype ListItem.svelte rewrite; declarative catalog schema (see #42).

Acceptance Criteria

  • List callout CM6 extension and markdown post-processor run from MarkdownPlugin on
    markdown views only.
  • Callout catalog settings tab works under Core plugins → Markdown; changes persist and
    rebuild editor/post-processor config.
  • Style sliders appear in configuration UI under markdown.listCallouts.style.* and
    update --lc-* variables on markdown surfaces live.
  • Legacy obsidian-list-callouts plugin data migrates into markdown.json once.
  • packages/plugins/plugin-list-callout is removed; spec/docs/index/issue-sync updated.
  • pnpm --filter @lapis-notes/markdown check and make spec-lint pass.

Notes

  • Default builtins: & yellow, ? orange, ! red, ~ purple, @ cyan + book-open,
    $ green, % gray (see former list-callout spec).
  • Preserve lc-* class names for upstream CSS compatibility.
  • Active plan: .cursor/plans/fold_list-callout_into_markdown_317a749a.plan.md

Implementation Summary

Confirmed list-callout is already folded into the markdown plugin: markdown owns the controller, settings, migrations, styles, and spec surface, and the standalone list-callout package is no longer present.

Move inline list-callout behavior from the colocated Obsidian-targeted `plugin-list-callout` package into `@lapis-notes/markdown`, migrate settings, and remove the standalone package. ## Context `packages/plugins/plugin-list-callout` (manifest id `obsidian-list-callouts`) decorates markdown list items with inline callout markers in source (CodeMirror) and reading/preview (DOM post-processor). It depends on the `obsidian` package and is **not** registered in workspace `bootstrap.ts` core plugins, so it never loads in Lapis today. List callouts belong with markdown editing/rendering, which already owns list preview via `ListItem.svelte` and invokes registered markdown post-processors from `markdown-preview.svelte`. Planned module layout under markdown: - `src/lib/list-callout/extension.ts` — CM6 decorations - `src/lib/list-callout/post-processor.ts` — preview DOM pass (sort order 10000) - `src/lib/list-callout/settings.ts` — types, defaults, config builders - `src/lib/list-callout/settings-tab.ts` — callout catalog UI (custom tab) - `src/lib/list-callout/list-callout.css` — moved from standalone `styles.css` - `src/lib/list-callout/config.schema.json` — declarative style sliders - `src/lib/list-callout/apply-style-vars.ts` — sync config → `--lc-*` CSS variables - `src/lib/list-callout/migrate-settings.ts` — legacy import Settings split: 1. **Callout catalog** (char, RGB color, optional icon, custom entries): custom plugin settings tab; persist in `/.obsidian/markdown.json` as `{ listCallouts: Callout[] }`. 2. **Style tuning** (opacity, padding — former Obsidian Style Settings): declarative `markdown.listCallouts.style.*` configuration schema with range controls. Migration: import `/.obsidian/plugins/obsidian-list-callouts/data.json` when markdown has no `listCallouts` yet; prune `obsidian-list-callouts` from `community-plugins.json` if present. Style Settings values cannot be auto-migrated (defaults via schema). Out of scope: rehype `ListItem.svelte` rewrite; declarative catalog schema (see #42). ## Acceptance Criteria - List callout CM6 extension and markdown post-processor run from `MarkdownPlugin` on markdown views only. - Callout catalog settings tab works under Core plugins → Markdown; changes persist and rebuild editor/post-processor config. - Style sliders appear in configuration UI under `markdown.listCallouts.style.*` and update `--lc-*` variables on markdown surfaces live. - Legacy `obsidian-list-callouts` plugin data migrates into `markdown.json` once. - `packages/plugins/plugin-list-callout` is removed; spec/docs/index/issue-sync updated. - `pnpm --filter @lapis-notes/markdown check` and `make spec-lint` pass. ## Notes - Default builtins: `&` yellow, `?` orange, `!` red, `~` purple, `@` cyan + book-open, `$` green, `%` gray (see former list-callout spec). - Preserve `lc-*` class names for upstream CSS compatibility. - Active plan: `.cursor/plans/fold_list-callout_into_markdown_317a749a.plan.md` ## Implementation Summary Confirmed list-callout is already folded into the markdown plugin: markdown owns the controller, settings, migrations, styles, and spec surface, and the standalone list-callout package is no longer present. <!-- backlog:task_id=TASK-PLUGIN-040 source_spec=spec/src/20-packages/plugins/markdown/index.md -->
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lapis-notes/lapis#58
No description provided.