Open SkepticMystic opened 2 years ago
Cool idea! If we don't want to make it harder for contributors, auto-formatting with GitHub Actions could be done as well.
Good idea! I'm fine with either. We can point to the same Prettifier config file, so that users can format notes while editing, too
I'd vote for making it work with GitHub actions.... ideally folks edit using Obsidian directly and there are no barriers on how to set up the linter/setting up a plugin (is there one for this?)/having technical knowledge to debug if something doesn't work.
One more thought: GitHub actions also allow folks to submit changes from GitHub's web interface.
@argenos there are two plugins which do exactly this! I personally prefer this one: https://github.com/hipstersmoothie/obsidian-plugin-prettier, but it makes fewer changes than the other. And I think it does the same formatting as the Prettifier extension in VS Code
I'd also throw the Obsidian Linter into the ring, which I personally prefer since it doesn't just apply some markdown linter, but rather develops it's own rules that make sense in Obsidian as an environment. (Though I am maybe biased after having contributed a bunch of rules to it).
Also, I think this discussion can be regarded as a sub-aspect of #52.
A note for when we turn on auto-reformatting of markdown files for consistency.
We need to make sure we opt for making -
the chosen list character, not *
In #553 we have some code for sorting lists of plugins by plug-in.
All the plugin lists currently use -
as the list character, and that is what the script supports.
If we were to choose *
, it would break the sorting of plugin lists.
I propose that we use a formatter to keep things consistent. I personally use Prettifier, but we could totally use a different one. We can put a Prettifier config file in the vault so that everyone uses the same settings.
Alot of the time, I run my Prettifier without even thinking, and then there are alot of small formatting changes added to the diff