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

.zed/settings.json: format markdown on save #21468

Closed
wants to merge 2 commits into from
Closed

Conversation

ConradIrwin
Copy link
Member

This should stop prettier yelling at me when I update documentation

Release Notes:

  • N/A

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Dec 3, 2024
@zed-industries-bot
Copy link

zed-industries-bot commented Dec 3, 2024

Warnings
⚠️
.zed/settings.json: format markdown on save
      ^

Write PR titles using sentence case.

Have feedback on this plugin? Let's hear it!

Generated by 🚫 dangerJS against db28a0e

@maxdeviant
Copy link
Member

@ConradIrwin Maybe this should go in your personal settings?

I think we specifically turned this off cause some folks on the team don't like it.

@ConradIrwin
Copy link
Member Author

I think we should either enable this, or disable the prettier check on CI; it's otherwise super annoying to have to make PRs twice.

We could maybe just do it in the docs directory?

@maxdeviant
Copy link
Member

I think we should either enable this, or disable the prettier check on CI; it's otherwise super annoying to have to make PRs twice.

Well I don't think we should disable Prettier in CI. It's important that the docs are well-formatted for diffability, especially since we get a lot of external contributions.

But in your case I'm not sure why making a change to your personal settings doesn't do the trick, since I haven't heard anyone else having an issue with the behavior.

We could maybe just do it in the docs directory?

I think that would be the least disruptive option, if we do intend to codify this in the project settings.

@ConradIrwin
Copy link
Member Author

I don't want to fix this in my settings because I'm a small minority of zed contributors, it seems best that everyone has things set up right.

Looking at our 144 markdown files, currently 6 don't pass prettier.

Running it manually gives: db28a0e, which

  • Removing double space after . in legal/terms.md and extensions/EXTRACTING
  • Replacing ~~~rust with ```rust in crates/gpui/docs
  • Adding/removing a blank line in crates/vim/README.md and crates/terminal_veiew/README.md

I think those are relatively uncontroversial (with perhaps the exception of the double-space after . thing); so think it'd probably be better to merge this than to set up a new zed config file for just docs.

@ConradIrwin
Copy link
Member Author

From talking with @maxdeviant the problem here is the project setting then overrides his user settings (which have been customized to disable format on save globally).

Going to close for now, but it'd be nice to find a way to either default format_on_save to on for markdown (which we can't do because prettier is too opinionated for many people's tastes) or have a mechanism to set "defaults" for a project that can be overridden by user settings.

@ConradIrwin ConradIrwin closed this Dec 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed The user has signed the Contributor License Agreement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants