Change indentation amount from 4 to 2
This commit is contained in:
parent
a797728845
commit
0209e194a5
1 changed files with 6 additions and 6 deletions
|
@ -154,7 +154,7 @@ fn Writer(comptime ChildWriter: type) type {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn emitIndent(self: *Self) !void {
|
pub fn emitIndent(self: *Self) !void {
|
||||||
try self.child_writer.writeByteNTimes(' ', self.indentation * 4);
|
try self.child_writer.writeByteNTimes(' ', self.indentation * 2);
|
||||||
if (self.indentation > 0) self.preceded_by_space = true;
|
if (self.indentation > 0) self.preceded_by_space = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -400,10 +400,10 @@ test "format statements" {
|
||||||
try expectFormat(
|
try expectFormat(
|
||||||
\\void main() { int x = 1; int y = 2; }
|
\\void main() { int x = 1; int y = 2; }
|
||||||
\\
|
\\
|
||||||
\\void main() {
|
\\void main() {
|
||||||
\\
|
\\
|
||||||
\\
|
\\
|
||||||
\\int x = 1;
|
\\int x = 1;
|
||||||
\\int y = 2;
|
\\int y = 2;
|
||||||
\\
|
\\
|
||||||
\\
|
\\
|
||||||
|
@ -471,10 +471,10 @@ test "format operators" {
|
||||||
test "format assignment" {
|
test "format assignment" {
|
||||||
try expectFormat(
|
try expectFormat(
|
||||||
\\void main() {
|
\\void main() {
|
||||||
\\int x =
|
\\int x =
|
||||||
\\
|
\\
|
||||||
\\1+1;
|
\\1+1;
|
||||||
\\x =
|
\\x =
|
||||||
\\
|
\\
|
||||||
\\-1;
|
\\-1;
|
||||||
\\}
|
\\}
|
||||||
|
@ -503,7 +503,7 @@ test "format multiline infix" {
|
||||||
test "format call" {
|
test "format call" {
|
||||||
try expectFormat(
|
try expectFormat(
|
||||||
\\vec4 x = vec4(
|
\\vec4 x = vec4(
|
||||||
\\ 1,2
|
\\ 1,2
|
||||||
\\
|
\\
|
||||||
\\ ,
|
\\ ,
|
||||||
\\ 3 ,4,
|
\\ 3 ,4,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue