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

Formatter does not respect Editor: Detect Indentation = false #573

Closed
1 of 4 tasks
Teslafly opened this issue Aug 11, 2021 · 0 comments
Closed
1 of 4 tasks

Formatter does not respect Editor: Detect Indentation = false #573

Teslafly opened this issue Aug 11, 2021 · 0 comments
Assignees
Milestone

Comments

@Teslafly
Copy link

Describe the bug

When Editor: Detect Indentation is false, I expect the formatter to use Editor: Tab size as the number of spaces YAML files use for tabs. Instead, it always auto-detects space number. I am trying to reformat a mess of YAML files to all 4 space tabs. But it keeps defaulting to 2 space tabs. Even with Editor: Detect Indentation = false, and Editor: Tab size = 4

This is also a bit of a workaround for the autodetection sometimes detecting 4 space formatted files as 2 space. Even after freshly formatting them as 4 space and reopening the file. I would love a number of spaces setting specific to the YAML extension.

Expected Behavior

If Editor: Detect Indentation is false, Editor: Tab size should be forced as the number of spaces in tabs for all files upon format save.

Current Behavior

YAML spaces per tab is always autodetected. Regardless of the state of Editor: Detect Indentation

Steps to Reproduce

  1. Make a yaml file with 2 space indentation.
  2. Change Editor: Detect Indentation to false and Editor: Tab size to 4.
  3. Reload file / vscode.
  4. In the bottom bar, select indentation "spaces" will be 2, [ctrl + s] will format the file to 2 space indentation, not 4.

Environment

  • Windows
  • Mac
  • Linux
  • other (please specify)
@evidolob evidolob added this to the 1.4.0 milestone Dec 22, 2021
bleach31 pushed a commit to bleach31/vscode-yaml that referenced this issue Jan 25, 2022
* Provide completion for schema ids in modeline redhat-developer#560

potential improvements:
- support range when there is already a value provided
- provide completion for local yaml schema files

Extracted a specific file for modeline related things.

fixes redhat-developer#560

Signed-off-by: Aurélien Pupier <[email protected]>

* Add completion for schema URI im modeline comment

Signed-off-by: Yevhen Vydolob <[email protected]>

Co-authored-by: Aurélien Pupier <[email protected]>
@evidolob evidolob closed this as completed Feb 1, 2022
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

3 participants