Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FR: Use a markdown formatter for consistency #31

Open
SkepticMystic opened this issue Oct 6, 2021 · 7 comments
Open

FR: Use a markdown formatter for consistency #31

SkepticMystic opened this issue Oct 6, 2021 · 7 comments

Comments

@SkepticMystic
Copy link
Contributor

SkepticMystic commented Oct 6, 2021

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

@konhi
Copy link
Member

konhi commented Oct 6, 2021

Cool idea! If we don't want to make it harder for contributors, auto-formatting with GitHub Actions could be done as well.

@SkepticMystic
Copy link
Contributor Author

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

@argenos
Copy link
Contributor

argenos commented Oct 12, 2021

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.

@argenos
Copy link
Contributor

argenos commented Oct 12, 2021

One more thought: GitHub actions also allow folks to submit changes from GitHub's web interface.

@SkepticMystic
Copy link
Contributor Author

@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

@chrisgrieser
Copy link
Member

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.

@claremacrae
Copy link
Contributor

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 *

Background

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants