You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Feature]: Honor .editorconfig tab width and optionally render whitespace in file and diff views #11076
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.
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.
File and diff views (file preview, working-tree/checkpoint diffs, and PR code review) all render through @pierre/diffs. That library’s documented default is --diffs-tab-size: 2, and T3 Code never overrides it. There is also no .editorconfig lookup today, so a project with tab_width = 4 / indent_size = 4 will look compressed or misaligned here even when other editors are correct.
This is display-only. Nothing in the current path rewrites files or converts tabs to spaces.
Not the same as existing whitespace settings
Hide whitespace changes (diffIgnoreWhitespace) ignores whitespace-only diff hunks. It does not change how a tab is drawn.
Word wrap only controls wrapping.
PR #10459 is about preserving trailing whitespace in parsed patches, not tab stops or visible markers.
No duplicate of this feature request turned up.
Suggested implementation (web/desktop first)
Resolve the nearest applicable .editorconfig section for the open file (tab_width, else indent_size) via existing projects.readFile, and cache it per workspace.
Pass that value through as --diffs-tab-size on the shared Pierre surfaces (FilePreviewPanel, StyledDiffCodeView / AnnotatableCodeView, PR code tab).
Add a default-off Show whitespace characters client setting (spaces → dots, tabs → arrows) that applies to both file and diff views.
Mobile native review diffs do not use Pierre’s CSS tab-size, so they can be a follow-up.
Happy to take a PR that stays display-only and covers file + diff together.
Activity
juliusmarminge commentedon Sep 10, 2026
Thanks for the clear write-up — this checks out.
What’s going on
File and diff views (file preview, working-tree/checkpoint diffs, and PR code review) all render through
@pierre/diffs. That library’s documented default is--diffs-tab-size: 2, and T3 Code never overrides it. There is also no.editorconfiglookup today, so a project withtab_width = 4/indent_size = 4will look compressed or misaligned here even when other editors are correct.This is display-only. Nothing in the current path rewrites files or converts tabs to spaces.
Not the same as existing whitespace settings
diffIgnoreWhitespace) ignores whitespace-only diff hunks. It does not change how a tab is drawn.No duplicate of this feature request turned up.
Suggested implementation (web/desktop first)
.editorconfigsection for the open file (tab_width, elseindent_size) via existingprojects.readFile, and cache it per workspace.--diffs-tab-sizeon the shared Pierre surfaces (FilePreviewPanel,StyledDiffCodeView/AnnotatableCodeView, PR code tab).Mobile native review diffs do not use Pierre’s CSS tab-size, so they can be a follow-up.
Happy to take a PR that stays display-only and covers file + diff together.
AndreiShenets commentedon Oct 8, 2026
Hi @juliusmarminge PR is attached. Please review when you have time.