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
tab_width is the width a tab character should be rendered as. indent_size is the size of an indent level. In many projects (e.g. every project in GNU C style) they are not the same. But zed seems to pick one and use it for both.
intmain() {
if (1) { // four spacesreturn0; // one tab
}
}
This should show the return 0 line with 8 spaces worth of indentation. But it should still use four space indents for editor commands that adjust indentation. (And, because indent_style = tab, also needs to replace n space indent with n/8 tabs and n%8 spaces)
The text was updated successfully, but these errors were encountered:
tbodt
changed the title
Doesn't seem to understand the difference between tab_width and indent_size in editorconfig
Doesn't understand the difference between tab_width and indent_size in editorconfig
Feb 2, 2025
Summary
tab_width is the width a tab character should be rendered as. indent_size is the size of an indent level. In many projects (e.g. every project in GNU C style) they are not the same. But zed seems to pick one and use it for both.
.editorconfig
test.c
This should show the
return 0
line with 8 spaces worth of indentation. But it should still use four space indents for editor commands that adjust indentation. (And, because indent_style = tab, also needs to replace n space indent with n/8 tabs and n%8 spaces)Zed Version and System Specs
Zed: v0.171.6 (Zed)
OS: macOS 15.1.1
Memory: 16 GiB
Architecture: aarch64
The text was updated successfully, but these errors were encountered: