zls
zls copied to clipboard
Apply multiple autofixes in a row when one reveals another
Let's assume https://github.com/zigtools/zls/pull/1476 is merged;
pub fn main() void {
var a = 1
}
Save once and it adds ;, save again and it adds an unused discard. This isn't great. :(
Is the following related to the this problem or should I open another issue?
When having this line:
pub fn format(self: Self, comptime fmt: []const u8, options: std.fmt.FormatOptions, writer: anytype) !void {}
After the first safe I get:
pub fn format(self: Self, comptime fmt: []const u8, options: std.fmt.FormatOptions, writer: anytype) !void {
_ = writer;
_ = options;
_ = fmt;
_ = self;}
Note the closing curly brace. After a second safe I get the expected output:
pub fn format(self: Self, comptime fmt: []const u8, options: std.fmt.FormatOptions, writer: anytype) !void {
_ = writer;
_ = options;
_ = fmt;
_ = self;
}
Is the following related to the this problem or should I open another issue?
I think this should be tracked as a separate issue.