Format Automatically with Prettier

approved

by Dylan Armstrong

Format files with Prettier using built-in settings for configuration.

6 stars603 downloadsUpdated 10mo agoMIT
View on GitHub

Obsidian Prettier Plugin

This is a formatting plugin for Obsidian.

It uses the built-in settings for tabs and tab spacing so it doesn't require configuration.

Differences from Other Projects

Unlike alexgavrusev/obsidian-format-with-prettier, there's no configuration available. The common prettier settings, tabs and number of spaces are taken from the official settings under Editor.

Installation

Install from community plugins.

Or unzip the latest release into .obsidian/plugins folder of your vault.

Usage

Format on save is enabled by default, and can be changed under plugin settings.

Additionally, a "Format current file" command is available.

Customization

This plugin only provides two options to prettier, namely tabWidth and useTabs. They are taken via the Editor settings. Beyond that, there's no customization provided.

Credits

Significant inspiration taken from alexgavrusev/obsidian-format-with-prettier and platers/obsidian-linter.

License

MIT License, for more details see License

For plugin developers

Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.