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

Why does Zed instruct taplo to use non-default value for indent_string (4 instead of default 2) #18065

Closed
1 task done
multivac61 opened this issue Sep 19, 2024 · 3 comments
Closed
1 task done
Labels
support User support (non-defect troubleshooting, documentation, etc) toml TOML data format support

Comments

@multivac61
Copy link

Check for existing issues

  • Completed

Describe the bug / provide steps to reproduce it

Formatting Cargo.toml using taplo cli yields different results than doing it inside zed. See attached video.

Environment

Zed: v0.152.4 (Zed)
OS: macOS 14.6.1
Memory: 64 GiB
Architecture: aarch64

If applicable, add mockups / screenshots to help explain present your vision of the feature

Uploading Export-1726748013517.mp4…

If applicable, attach your Zed.log file to this issue.

No response

@multivac61 multivac61 added admin read Pending admin review bug [core label] triage Maintainer needs to classify the issue labels Sep 19, 2024
@osiewicz
Copy link
Contributor

osiewicz commented Sep 20, 2024

That's probably due to our default settings for all languages (that can be overriden on a language-by-language basis) having tab_size set to 4:

"tab_size": 4,

And then when formatting:
tab_size: settings.tab_size.into(),

@notpeter
Copy link
Member

@multivac61 Is this fixed by adding the following to your settings:

  "languages": {
    "TOML": {
      "tab_size": 2
    }
  },

@notpeter notpeter added needs info / awaiting response Issue that needs more information from the user toml TOML data format support support User support (non-defect troubleshooting, documentation, etc) and removed bug [core label] triage Maintainer needs to classify the issue admin read Pending admin review labels Sep 24, 2024
@multivac61
Copy link
Author

multivac61 commented Sep 24, 2024

@multivac61 Is this fixed by adding the following to your settings:

  "languages": {
    "TOML": {
      "tab_size": 2
    }
  },

Yes.

@notpeter notpeter removed the needs info / awaiting response Issue that needs more information from the user label Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
support User support (non-defect troubleshooting, documentation, etc) toml TOML data format support
Projects
None yet
Development

No branches or pull requests

3 participants