Add markdown lint quick fixes and vault-scoped rule suppressions #92

Closed
opened 2026-05-22 22:48:48 +00:00 by steve · 0 comments
Owner

Add markdownlint quick fixes to the editor experience and persist vault-scoped rule suppressions for the bundled markdown-lint system extension.

Problem

The markdown lint plugin reports diagnostics but does not surface markdownlint's existing auto-fix support. It also offers no persisted app-level way to suppress specific rules for a vault, even though the underlying library already supports rule configuration.

Goal

Expose fixable markdownlint violations as editor quick fixes and add a vault-scoped markdown-lint setting for disabling selected rules.

Scope

  • Add persisted markdown-lint plugin configuration under app config for disabled rule IDs.
  • Thread that configuration into the browser worker and Electron native markdownlint providers.
  • Return markdown code actions for fixable markdownlint diagnostics in both runtimes.
  • Update tests and spec for the new behavior.

Non-goals

  • Full markdownlint rule-option passthrough.
  • Custom rules, external config file loading, or JS-backed markdownlint config.
  • New workspace-wide lint commands or formatter/fix-all command parity.
  • Cursor-aware focus-mode behavior or lint severity remapping.

Acceptance Criteria

  • Markdown lint diagnostics offer quick-fix actions for rules supported by markdownlint auto-fix.
  • Electron users receive the same markdown quick-fix behavior as browser/PWA users.
  • The app persists a vault-scoped disabled-rule list for markdown-lint and applies it without restart.
  • Existing inline markdownlint suppression comments continue to work.
  • Automated tests cover disabled-rule config and markdown code-action behavior.
  • Spec pages for the markdown-lint package are updated to describe settings and quick-fix ownership.

Implementation Notes

  • Keep @lapis-notes/markdown-lint on the declarative system-extension path.
  • Prefer a small system-extension provider API change so provider factories can read app configuration instead of introducing a bespoke plugin class.
  • Start with a simple disabledRules: string[] schema.

Suggested Files or Specs To Inspect

  • spec/src/20-packages/plugins/markdown-lint/index.md
  • spec/src/30-cross-package-contracts/configuration-and-settings.md
  • packages/api/src/lib/lapis-extension.ts
  • packages/api/src/lib/plugin-manager.ts
  • packages/plugins/plugin-markdown-lint/src/index.ts
  • packages/language-service/src/markdown.ts
  • packages/language-service/src/workers/markdownlint.worker.ts
  • packages/desktop-electron/src-electron/language-service-sidecar-child.ts

Validation Commands

  • pnpm --filter @lapis-notes/markdown-lint check
  • pnpm --filter @lapis-notes/language-service check
  • pnpm --filter @lapis-notes/desktop-electron check
  • pnpm check
  • pnpm test:smoke
  • make spec-lint

Follow-up Tasks

  • Consider full markdownlint rule-config passthrough after the disabled-rule path lands.
  • Consider app-level severity mapping or save-time lint policies if users want more control.

Implementation Summary

Added vault-scoped markdown lint rule suppressions, browser and Electron quick fixes, and regression/spec coverage for the markdown-lint system extension.

Add markdownlint quick fixes to the editor experience and persist vault-scoped rule suppressions for the bundled markdown-lint system extension. ## Problem The markdown lint plugin reports diagnostics but does not surface markdownlint's existing auto-fix support. It also offers no persisted app-level way to suppress specific rules for a vault, even though the underlying library already supports rule configuration. ## Goal Expose fixable markdownlint violations as editor quick fixes and add a vault-scoped markdown-lint setting for disabling selected rules. ## Scope - Add persisted markdown-lint plugin configuration under app config for disabled rule IDs. - Thread that configuration into the browser worker and Electron native markdownlint providers. - Return markdown code actions for fixable markdownlint diagnostics in both runtimes. - Update tests and spec for the new behavior. ## Non-goals - Full markdownlint rule-option passthrough. - Custom rules, external config file loading, or JS-backed markdownlint config. - New workspace-wide lint commands or formatter/fix-all command parity. - Cursor-aware focus-mode behavior or lint severity remapping. ## Acceptance Criteria - Markdown lint diagnostics offer quick-fix actions for rules supported by markdownlint auto-fix. - Electron users receive the same markdown quick-fix behavior as browser/PWA users. - The app persists a vault-scoped disabled-rule list for markdown-lint and applies it without restart. - Existing inline markdownlint suppression comments continue to work. - Automated tests cover disabled-rule config and markdown code-action behavior. - Spec pages for the markdown-lint package are updated to describe settings and quick-fix ownership. ## Implementation Notes - Keep `@lapis-notes/markdown-lint` on the declarative system-extension path. - Prefer a small system-extension provider API change so provider factories can read app configuration instead of introducing a bespoke plugin class. - Start with a simple `disabledRules: string[]` schema. ## Suggested Files or Specs To Inspect - `spec/src/20-packages/plugins/markdown-lint/index.md` - `spec/src/30-cross-package-contracts/configuration-and-settings.md` - `packages/api/src/lib/lapis-extension.ts` - `packages/api/src/lib/plugin-manager.ts` - `packages/plugins/plugin-markdown-lint/src/index.ts` - `packages/language-service/src/markdown.ts` - `packages/language-service/src/workers/markdownlint.worker.ts` - `packages/desktop-electron/src-electron/language-service-sidecar-child.ts` ## Validation Commands - `pnpm --filter @lapis-notes/markdown-lint check` - `pnpm --filter @lapis-notes/language-service check` - `pnpm --filter @lapis-notes/desktop-electron check` - `pnpm check` - `pnpm test:smoke` - `make spec-lint` ## Follow-up Tasks - Consider full markdownlint rule-config passthrough after the disabled-rule path lands. - Consider app-level severity mapping or save-time lint policies if users want more control. ## Implementation Summary Added vault-scoped markdown lint rule suppressions, browser and Electron quick fixes, and regression/spec coverage for the markdown-lint system extension. <!-- backlog:task_id=TASK-PLUGIN-064 source_spec=spec/src/20-packages/plugins/markdown-lint/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#92
No description provided.