Preferences/Settings/"Tab Size" option and "Insert Spaces" option not working as expected #172171
Labels
settings-editor
VS Code settings editor issues
under-discussion
Issue is under discussion for relevance, priority, approach
Milestone
Type: Bug
Steps to reproduce
1- Install VSCode (portable version)
2- Install C# for VS Code extension
3- Create a C# console app using the CLI
4- Open the project folder in VSCode
5- Go to File/Preferences/Settings
6- In the "User" settings set:
a) Editor: Tab Size to 3
b) Editor: Render Whitespace to "all"
c) Editor: Insert Spaces to "false" (unchecked)
d) Editor: Detect Indentation to "false" (unchecked)
7- In the "Workspace" settings set:
a) Editor: Tab Size to 4
b) Editor: Render Whitespace to "selection" (default)
c) Editor: Insert Spaces to "true" (checked) (default)
d) Editor: Detect Indentation to "false" (unchecked)
When I close the the settings this is what is stored in the settings.json file
It's storing only the non default values so when I press tab the tab size is 3 and it's not inserting spaces!
And the whitespaces are all rendered all the time. In this case they must be rendered only when a selection is made!
Solution
When creating/modifying the settings.json VSCode must analyze the hierarchy of settings (Folder, Workspace, User) to determine what values must be stored in the file.
Currently I'm working on a solution with four projects. Two of them use whitespaces the others use tabs. I had to switch to Visual Studio because it's using the User settings instead the folder settings. So all files of all projects are stored using spaces in all cases.
VS Code version: Code 1.74.3 (97dec17, 2023-01-09T16:59:02.252Z)
OS version: Windows_NT x64 10.0.19045
Modes:
Sandboxed: No
System Info
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: unavailable_off
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: enabled
video_encode: unavailable_off
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off
Extensions (1)
The text was updated successfully, but these errors were encountered: