Skip to content

2.0.0

Choose a tag to compare

@kdnk kdnk released this 10 Sep 11:04
· 14 commits to main since this release

Breaking changes

  • List hierarchy indentation now follows the current Obsidian Editor tab and spacing settings. Skipped indentation levels are repaired before Prettier runs, so formatting existing notes can change their list structure. For example, an eight-space child directly under a root becomes a one-tab child when tabs are enabled.
  • Current Obsidian Editor settings take precedence over legacy indentation values saved by the plugin. Existing intermediate list ancestors are retained; descendants and continuation lines move with their owning item.
  • Embedded code formatting is disabled. Code-content whitespace is preserved, and blocks containing multiline inline code, links, images, or reference definitions are kept out of Prettier's formatting pass.

Improvements

  • Apply formatting as a single atomic editor change, with no edit when the output is unchanged.
  • Discard formatting results if typing or navigation changes the active document while formatting is running.
  • Support both tabs and configured space indentation, with Markdown-aware handling of ordered lists and protected content.
  • Align package, manifest, and compatibility metadata at version 2.0.0. The declared minimum Obsidian version remains 0.15.0.

Automatic Linker migration

If Automatic Linker coordinates saving, disable this plugin's Format on save and Linter's Lint on save, then enable Automatic Linker's Prettier and Linter stages. The order is links → Prettier → Linter. Install this release before updating to an Automatic Linker version that removes its old indentation-cleanup option, and avoid conflicting Linter indentation rules.

Installation

Extract obsidian-prettier-plugin.zip into your vault's .obsidian/plugins/prettier-format/ directory, or copy the attached main.js, manifest.json, and styles.css there, then reload the plugin.

Validation

  • 35 automated tests passed, covering real Prettier formatting, idempotence, protected content, and editor application.
  • TypeScript checks, production build, and ESLint passed.