Format Automatically with Prettier

by Dylan Armstrong
5
4
3
2
1
Score: 51/100

Description

The Obsidian Prettier Plugin automatically formats your Markdown files using Prettier, aligning with the tab and spacing settings defined in the Editor preferences. It supports format-on-save and includes a manual command to format the current file. Unlike other Prettier integrations, it avoids extra configuration and keeps things simple by only respecting tab width and tab usage from the editor. This minimalist approach is ideal for users who want consistent formatting without managing complex rules or settings.

Reviews

No reviews yet.

Stats

6
stars
726
downloads
0
forks
361
days
348
days
348
days
0
total PRs
0
open PRs
0
closed PRs
0
merged PRs
0
total issues
0
open issues
0
closed issues
9
commits

Latest Version

a year ago

Changelog

  • Changes how changes are applied from linter to manually adjust editor's codemirror. This fixes the cursor jumping around on save from wrong offsets, and also doesn't uncollapse sections.

README file from

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

Similar Plugins

info
• Similar plugins are suggested based on the common tags between the plugins.
Easy Typing
5 years ago by yaozhuwa
This is a plugin of obsidian for users writing in an easy way.
Vimrc Support
6 years ago by esm
A plugin for the Obsidian.md note-taking software
Prettier Format
5 years ago by Andrew Lisowski
Format obsidian.md notes using prettier
Format code blocks of various languages
4 years ago by iVariable
Format with Prettier
2 years ago by Alex Gavrusev
Format files in your Obsidian vault using Prettier
Simple Tab Indent
a year ago by Thiago Frias
Scrolling
10 months ago by omeyenburg
Obsidian plugin to keep your cursor centered, disable code wrapping, remember position in a file, and more.
Prettier
2 years ago by GoodbyeNJN
Simple Code Formatter
2 years ago by SY
Format current code block in obsidian.
LawList: Custom List Styles
a year ago by Willem Schlieter
A plugin for custom list styles in Obsidian.md.
Header Adjuster
2 years ago by Valentin Pelletier
Header level Reformat Plugin for Obsidian
Emoji Picker
a year ago by Ali Faraji
An up-to-date Emoji Picker for obisian.md, using emoji-mart.
Smart Link Formatter
10 months ago by ccmdi
Obsidian plugin that automatically formats links with information from dynamic websites
Thecap cv generator
a year ago by Thecap
JIRA links shortener
a year ago by Ruslans Platonovs
Obsidian JIRA links shortener plugin
Negative Heading
2 months ago by Ashan Devine
Render Discord-style "-#" lines as compact headings in reading view and the editor.
Auto Math
2 months ago by Vladislav Sorokin
Auto-expands LaTeX snippets. External rules with live reload, Custom Rules Editor, and default math pack.