Problem
Projects that use tab characters can be difficult to read in T3 Code because tabs are currently always rendered at a fixed width of two spaces.
If a project's .editorconfig defines a different tab width, code that is correctly aligned in other editors appears compressed or misaligned in T3 Code. Deeply nested code becomes difficult to scan, and alignment based on tab stops can appear broken.
This affects both file and diff views. It is also difficult to distinguish tabs from spaces when reviewing formatting-sensitive changes.
Proposed solution
Have T3 Code's file and diff views honor the applicable .editorconfig settings for each file:
- Use
tab_width when specified.
- Fall back to
indent_size when tab_width is not specified.
- Resolve the nearest applicable
.editorconfig section based on the file path.
This should only affect how existing tab characters are displayed. It should not rewrite files or convert tabs to spaces.
Additionally, add a Show whitespace characters setting for file and diff views:
- When disabled, whitespace is rendered normally.
- When enabled, spaces are shown with dot markers and tabs with arrow markers.
- The setting applies consistently to both file and diff views.
- The setting is disabled by default.
Expected behavior
Given this .editorconfig:
root = true
[*]
indent_style = tab
indent_size = 4
tab_width = 4
[*.md]
indent_style = space
indent_size = 2
Tab characters in source files should occupy four columns in file and diff views.
When Show whitespace characters is enabled, spaces and tabs should have distinct visible markers so indentation and whitespace-only changes can be reviewed accurately.
Problem
Projects that use tab characters can be difficult to read in T3 Code because tabs are currently always rendered at a fixed width of two spaces.
If a project's
.editorconfigdefines a different tab width, code that is correctly aligned in other editors appears compressed or misaligned in T3 Code. Deeply nested code becomes difficult to scan, and alignment based on tab stops can appear broken.This affects both file and diff views. It is also difficult to distinguish tabs from spaces when reviewing formatting-sensitive changes.
Proposed solution
Have T3 Code's file and diff views honor the applicable
.editorconfigsettings for each file:tab_widthwhen specified.indent_sizewhentab_widthis not specified..editorconfigsection based on the file path.This should only affect how existing tab characters are displayed. It should not rewrite files or convert tabs to spaces.
Additionally, add a Show whitespace characters setting for file and diff views:
Expected behavior
Given this
.editorconfig:Tab characters in source files should occupy four columns in file and diff views.
When Show whitespace characters is enabled, spaces and tabs should have distinct visible markers so indentation and whitespace-only changes can be reviewed accurately.