Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Plugin Packages

Plugins are a first-class architectural unit. They provide both bundled product features and community-style extensions.

Package Groups

GroupSource pathBoot relationship
First-party plugin packagespackages/plugins/plugin-* packages that depend on @lapis-notes/apiEither registered by the workspace shell as bundled/core plugins or distributed as official registry-installable plugins
Obsidian-targeted packagesColocated packages that still depend on upstream obsidianNot part of the current workspace boot sequence unless a host loads them as community-style plugins
Workspace-local featurespackages/workspace/src/lib/feature/Behave like core plugins but are owned by the workspace package

First-Party Plugins

PackageResponsibility
MarkdownMarkdown, media, properties, outline, metadata, and editor behavior
Markdown LintOfficial installable markdown diagnostics registration across browser workers and Electron
SearchSidebar search, indexing controls, semantic-search status, and search UI
TasksBrowser-first task capture, filtering, and bundled task persistence
Bases.bases and .base structured data views
CanvasJSON Canvas editing over .canvas files
CSVCSV/TSV source and editable table preview
DocsUniver-backed native document and sheet editing
FmodeHint-based keyboard navigation for opted-in workspace chrome
GraphGlobal and local note graph visualization
HistoryPlanned persisted text-file revision history, history view, and restore flow
NotificationsRequired in-app notification center, toasts, and progress status
NotebookNotebook files, markdown cells, and runtime-facing notebook views
PDFEmbedPDF-backed .pdf file views and markdown PDF embeds
SlidesReveal.js-backed presentation views over markdown notes
TelemetryDiagnostics leaf, telemetry settings, and persisted trace buffers

Canvas, Graph, Markdown Lint, Notebook, PDF, Slides, Telemetry, and Docs are external official plugins. Their packages remain in the monorepo for building and publishing official artifacts, but the workspace does not register them in the bundled core list. Installed official records with provenance: "official" still appear under Core plugins and activate through optional-core Safe Mode policy. Bases remains bundled and non-installable for this phase.

Obsidian-Targeted Packages

PackageResponsibility
SpellcheckerHarper-backed grammar and spelling diagnostics

The spellchecker package keeps its own permissive package metadata because it is an Obsidian-targeted compatibility package rather than a bundled Lapis core plugin in the current app boot sequence.

Styling Ownership

First-party plugin UI should follow the shared Plugin CSS Contract. The contract owns the current CSS artifact rules and rollout tracker so individual plugin pages can describe package-specific selectors without duplicating global policy.

Workspace-Local Built-in Features

The workspace package also contains features that behave like plugins but are not distributed as separate packages:

FeaturePurpose
AppPluginCore commands, ribbon actions, icon pack
FileExplorerPluginFile tree view and reveal-path command
WordCountStatus bar word/character/sentence count
LangCodeText views and language extensions for JS, JSON, YAML, CSS, plain text

These are documented in detail on the Workspace App page.

Community Plugin Loading

Plugin Runtime owns the common runtime contract for bundled and community plugins. The workspace shell now creates a CommonJS dependency resolver from generated host-module metadata and generated provider values, while deps.ts is limited to explicit legacy/private overrides and browser fallbacks, so plugins can still require() common packages such as obsidian, selected @lapis-notes/api/* exports, @codemirror/*, luxon, zod, clsx, and bits-ui.

This allows community plugins written for the Obsidian API to run with minimal or no modification when the active host supports the required APIs.

Architecture Patterns

PatternPlugins Using
CodeMirror extensionsmarkdown, spellchecker
Svelte view componentsmarkdown, search, bases
Web Workersmarkdown metadata, markdown-lint, spellchecker linting
External enginessearch, bases, spellchecker
Custom parsersmarkdown, bases
HTML post-processingmarkdown (list callouts)
Metadata processorsmarkdown
Type widgetsmarkdown