feat: add toggle_auto_save command

This commit is contained in:
CJ van den Berg 2025-07-16 16:35:22 +02:00
parent c300c4f7f2
commit c5fe992f75
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9

View file

@ -4774,6 +4774,11 @@ pub const Editor = struct {
pub const SaveOption = enum { default, format, no_format };
pub fn toggle_auto_save(self: *Self, _: Context) Result {
self.enable_auto_save = !self.enable_auto_save;
}
pub const toggle_auto_save_meta: Meta = .{ .description = "Toggle auto save" };
pub fn toggle_format_on_save(self: *Self, _: Context) Result {
self.enable_format_on_save = !self.enable_format_on_save;
}