Repository: vscode
Issue: Json sort command does not honor indentation with tabs
Labels: bug,json,json-sorting


Type: <b>Bug</b>

I have the setting `"editor.insertSpaces": false`. Then I run the command `>JSON: Sort Document` on my user settings.json file.
Expected result: objects in the settings.json are sorted by their keys, and the document is formatted.
Actual behavior: objects in the settings.json are sorted by their keys, document is formatted, but uses spaces instead of tabs.

VS Code version: Code 1.76.1 (5e805b79fcb6ba4c2d23712967df89a089da575b, 2023-03-08T16:32:00.131Z)
OS version: Windows_NT x64 10.0.19045
Modes:
Sandboxed: No
Remote OS version: Linux x64 5.15.90.1-microsoft-standard-WSL2
Connection to 'dev-container+633a5c55736572735c76696c6c656a31305c7372635c7765622d736572766572' could not be established

<details>
<summary>System Info</summary>

|Item|Value|
|---|---|
|CPUs|11th Gen Intel(R) Core(TM) i7-11850H @ 2.50GHz (16 x 2496)|
|GPU Status|2d_canvas: enabled<br>canvas_oop_rasterization: disabled_off<br>direct_rendering_display_compositor: disabled_off_ok<br>gpu_compositing: enabled<br>multiple_raster_threads: enabled_on<br>opengl: enabled_on<br>rasterization: enabled<br>raw_draw: disabled_off_ok<br>skia_renderer: enabled_on<br>video_decode: enabled<br>video_encode: enabled<br>vulkan: disabled_off<br>webgl: enabled<br>webgl2: enabled<br>webgpu: disabled_off|
|Load (avg)|undefined|
|Memory (System)|15.73GB (0.83GB free)|
|Process Argv|--crash-reporter-id c5a1a827-bcc3-4406-8db9-b4ae3a1d12c9|
|Screen Reader|no|
|VM|0%|

|Item|Value|
|---|---|
|Remote|Dev Container: onboard-fleet-sp-C++|
|OS|Linux x64 5.15.90.1-microsoft-standard-WSL2|
|CPUs|11th Gen Intel(R) Core(TM) i7-11850H @ 2.50GHz (16 x 2495)|
|Memory (System)|7.62GB (4.60GB free)|
|VM|0%|

Connection to 'dev-container+633a5c55736572735c76696c6c656a31305c7372635c7765622d736572766572' could not be established
</details><details><summary>Extensions (67)</summary>

Extension|Author (truncated)|Version
---|---|---
language-x86-64-assembly|13x|3.0.0
Bookmarks|ale|13.3.1
language-gas-x86|bas|0.0.2
cmake-format|che|0.6.11
doxdocgen|csc|1.4.0
unicodepalette|Dal|1.0.4
vscode-markdownlint|Dav|0.49.0
shebang-language-associator|dav|1.4.0
gitlens|eam|13.3.2
EditorConfig|Edi|0.16.4
file-icons|fil|1.0.29
shell-format|fox|7.2.5
codespaces|Git|1.14.0
remotehub|Git|0.53.2023031301
vscode-pull-request-github|Git|0.61.2023030709
cpp-reference|Guy|0.2.3
vscode-drawio|hed|1.6.6
better-shellscript-syntax|jef|1.4.5
vscode-graphviz|joa|0.0.6
vscode-clangd|llv|0.1.23
bash-ide-vscode|mad|1.35.0
vscode-catch2-test-adapter|mat|4.3.10
code-point|med|1.9.0
git-graph|mhu|1.30.0
file-downloader|min|1.0.12
vscode-boost-jam|mlo|0.0.2
azure-pipelines|ms-|1.208.0
vscode-docker|ms-|1.24.0
gather|ms-|2022.3.2
isort|ms-|2023.9.10591013
pylint|ms-|2023.5.10621012
python|ms-|2023.5.10721010
vscode-pylance|ms-|2023.3.21
jupyter|ms-|2023.2.1200692131
jupyter-keymap|ms-|1.1.0
jupyter-renderers|ms-|1.0.15
vscode-jupyter-cell-tags|ms-|0.1.6
vscode-jupyter-slideshow|ms-|0.1.5
remote-containers|ms-|0.283.0
remote-ssh|ms-|0.99.2023030315
remote-ssh-edit|ms-|0.84.0
remote-wsl|ms-|0.76.1
vscode-remote-extensionpack|ms-|0.24.0
azure-account|ms-|0.11.3
azure-repos|ms-|0.29.2023031301
cmake-tools|ms-|1.14.15
cpptools|ms-|1.14.4
cpptools-extension-pack|ms-|1.3.0
hexeditor|ms-|1.9.11
makefile-tools|ms-|0.6.0
powershell|ms-|2023.2.1
remote-explorer|ms-|0.3.2023021509
remote-repositories|ms-|0.31.2023031301
remote-server|ms-|1.1.2023022709
test-adapter-converter|ms-|0.1.6
vsliveshare|ms-|1.0.5834
vscode-commons|red|0.0.6
vscode-xml|red|0.25.2023031109
vscode-yaml|red|1.12.1
vscode-sort-json|ric|1.20.0
conanlight|Son|1.4.0
code-spell-checker|str|2.19.0
shellcheck|tim|0.29.4
intellicode-api-usage-examples|Vis|0.2.7
vscodeintellicode|Vis|1.2.30
vscode-icons|vsc|12.2.0
cmake-highlight|zch|0.0.1

(1 theme extensions excluded)

</details><details>
<summary>A/B Experiments</summary>

```
vsliv368cf:30146710
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
vslsvsres303:30308271
pythonvspyl392:30443607
vserr242:30382549
pythontb:30283811
vsjup518:30340749
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
pythondataviewer:30285071
vscod805:30301674
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
cmake_vspar411:30581797
vsaa593cf:30376535
pythonvs932:30410667
cppdebug:30492333
vsclangdf:30486550
c4g48928:30535728
dsvsc012:30540252
pynewext54:30681850
azure-dev_surveyonecf:30548226
pyindex848:30662994
nodejswelcome1:30587005
3biah626:30602489
pyind779:30671433
89544117:30613380
pythonsymbol12:30671437
2i9eh265:30646982
showlangstatbar:30672706
vsccsb:30677849
funwalk2cf:30682975

```

</details>

<!-- generated by issue reporter -->