Repository: zng-ui/zng (language: rust)

Issue:
Implement cargo zng fmt
This command calls `cargo fmt` and then formats widget macros.


Discussion / hints:

Fix patch:
diff --git a/.vscode/settings.json b/.vscode/settings.json
index b01975a88..f524cd8b2 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -7,6 +7,17 @@
         "do",
         "rust_analyzer_check"
     ],
+    "rust-analyzer.rustfmt.overrideCommand": [
+        "cargo",
+        "run",
+        "--quiet",
+        "-p",
+        "cargo-zng",
+        "--",
+        "zng",
+        "fmt",
+        "--stdin"
+    ],
     "files.eol": "\n",
     "explorer.fileNesting.patterns": {
         "*.rs": "${capture}.stderr",
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 97f58603d..9e70b16ac 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,7 @@
 # Unreleased
 
+* Add `cargo zng fmt` that formats normal code with `cargo fmt` + Zng and other macros.
+    - See [`cargo-zng/README.md`](./crates/cargo-zng/README.md#fmt) for details on IDE integration.
 * Fix named `Align` deserialization from human readable formats.
 * Fix `SelectableText!` shorthand syntax.
 * Fix layer `AnchorSize::Window` not filling the window space by default.
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 30c4e80f3..d138eb8a2 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -36,7 +36,7 @@ The [`tests`] README provides an overview of integration and macro tests.
 ### VSCode & Rust Analyzer
 
 Some workspace settings are included in the repository, in particular, `rust-analyzer` "checkOnSave" 
-and runnables are redirected to the `do` tool.
+and runnables are redirected to the `do` tool, and format is redirected to `cargo-zng fmt --stdin`.
 
 Snippets for most Zng macros are also provided, see [`zng.code-snippets`].
 
diff --git a/crates/cargo-zng/Cargo.toml b/crates/cargo-zng/Cargo.toml
index 61ce48dc3..2383bc027 100644
--- a/crates/cargo-zng/Cargo.toml
+++ b/crates/cargo-zng/Cargo.toml
@@ -40,5 +40,9 @@ anyhow = "1.0"
 dunce = "1.0"
 zng-env = { path = "../zng-env", version = "0.3.0" }
 
+# fmt
+regex = "1.10"
+once_cell = "1.19"
+
 [package.metadata.docs.rs]
 all-features = true
diff --git a/crates/cargo-zng/README.md b/crates/cargo-zng/README.md
index 7afcb0080..ebbd676f3 100644
--- a/crates/cargo-zng/README.md
+++ b/crates/cargo-zng/README.md
@@ -23,6 +23,7 @@ Zng project manager.
 Usage: cargo zng <COMMAND>
 
 Commands:
+  fmt   Format code and macros
   new   New project from a Zng template repository
   l10n  Localization text scraper
   res   Build resources
@@ -33,6 +34,64 @@ Options:
   -V, --version  Print version
 ```
 
+## `fmt`
+
+Formats the code with `cargo fmt` and formats Zng macros and some other braced macros.
+
+<!--do doc --readme do zng fmt --help -->
+```console
+$ cargo zng fmt --help
+
+Format code and macros
+
+Runs cargo fmt and formats Zng macros
+
+Usage: cargo zng fmt [OPTIONS]
+
+Options:
+      --check
+          Only check if files are formatted
+
+      --manifest-path <MANIFEST_PATH>
+          Format the crate identified by Cargo.toml
+
+  -p, --package <PACKAGE>
+          Format the workspace crate identified by package name
+
+  -f, --files <FILES>
+          Format all files matched by glob
+
+  -s, --stdin
+          Format the stdin to the stdout
+
+  -h, --help
+          Print help (see a summary with '-h')
+
+  -V, --version
+          Print version
+```
+
+The formatter supports Zng macros and also attempts to format all braced macro contents 
+like `foo! { <contents> }` by copying it into a temporary item `fn _fmt_item() { <contents> }` 
+and trying `rustfmt`, if the contents cannot be formatted like this they are not touched.
+
+### IDE Integration
+
+You can configure Rust-Analyzer to use `cargo zng fmt --stdin` as your IDE formatter. 
+
+In VsCode add this to the workspace config at `.vscode/settings.json`:
+
+```json
+"rust-analyzer.rustfmt.overrideCommand": [
+    "cargo",
+    "zng",
+    "fmt",
+    "--stdin"
+],
+```
+
+Now Zng macros format with the format context action and command.
+
 ## `new`
 
 Initialize a new repository from a Zng template repository.
@@ -251,7 +310,7 @@ Also see [`zng::l10n::l10n!`] docs for more details about the expected format.
 
 [`zng::l10n::l10n!`]: https://zng-ui.github.io/doc/zng/l10n/macro.l10n.html#scrap-template
 
-# `res`
+## `res`
 
 Build resources
 
@@ -324,7 +383,7 @@ This subcommand can be used to build resources and package releases. It is very
 a resources directory tree as close as possible to the final resources structure, and place special
 `.zr-{tool}` files on it that are calls to `cargo-zng-res-{tool}` crates or executables.
 
-## Resource Build
+### Resource Build
 
 The resource build follows these steps:
 
@@ -334,7 +393,7 @@ The resource build follows these steps:
   - This repeats until a pass does not find any `.zr-*` or the `--recursion_limit` is reached.
 * Run all tools that requested `zng-res::on-final=` from a request that still exists.
 
-## Tools
+### Tools
 
 You can call `cargo zng res --tools` to see help for all tools available. Tools are searched in this order:
 
@@ -343,7 +402,7 @@ You can call `cargo zng res --tools` to see help for all tools available. Tools
 * If the tool is builtin, executes it.
 * If a `cargo-zng-res-{tool}[.exe]` is installed in the same directory as the running `cargo-zng[.exe]`, executes it.
 
-### Authoring Tools
+#### Authoring Tools
 
 Tools are configured using environment variables:
 
@@ -628,7 +687,7 @@ $ cargo zng res --tool shf
   Apart from running on final this tool behaves exactly like .zr-sh
 ```
 
-### `.zr-warn`
+#### `.zr-warn`
 
 <!--do doc --readme do zng res --tool warn -->
 ```console
@@ -646,7 +705,7 @@ $ cargo zng res --tool warn
   Prints a warning with the value of ZR_APP
 ```
 
-### `.zr-fail`
+#### `.zr-fail`
 
 <!--do doc --readme do zng res --tool fail -->
 ```console
diff --git a/crates/cargo-zng/src/fmt.rs b/crates/cargo-zng/src/fmt.rs
new file mode 100644
index 000000000..f8cb4e299
--- /dev/null
+++ b/crates/cargo-zng/src/fmt.rs
@@ -0,0 +1,422 @@
+use std::{
+    borrow::Cow,
+    fs,
+    io::{self, Read, Write},
+    path::Path,
+    process::Stdio,
+};
+
+use clap::*;
+use once_cell::sync::Lazy;
+use proc_macro2::{Delimiter, TokenStream, TokenTree};
+use rayon::prelude::*;
+use regex::Regex;
+
+use crate::util;
+
+#[derive(Args, Debug, Default)]
+pub struct FmtArgs {
+    /// Only check if files are formatted
+    #[arg(long, action)]
+    check: bool,
+
+    /// Format the crate identified by Cargo.toml
+    #[arg(long)]
+    manifest_path: Option<String>,
+
+    /// Format the workspace crate identified by package name
+    #[arg(short, long)]
+    package: Option<String>,
+
+    /// Format all files matched by glob
+    #[arg(short, long)]
+    files: Option<String>,
+
+    /// Format the stdin to the stdout.
+    #[arg(short, long, action)]
+    stdin: bool,
+}
+
+pub fn run(mut args: FmtArgs) {
+    let (check, action) = if args.check { ("--check", "checking") } else { ("", "formatting") };
+
+    let mut custom_fmt_files = vec![];
+
+    if args.stdin {
+        if args.manifest_path.is_some() || args.package.is_some() || args.files.is_some() {
+            fatal!("stdin can only be used standalone or with --check");
+        }
+
+        let mut code = String::new();
+        if let Err(e) = std::io::stdin().read_to_string(&mut code) {
+            fatal!("stdin read error, {e}");
+        }
+
+        if code.is_empty() {
+            return;
+        }
+
+        if let Some(code) = rustfmt_stdin(&code) {
+            let stream: TokenStream = code.parse().unwrap_or_else(|e| fatal!("cannot parse stdin, {e}"));
+
+            let formatted = fmt_code(&code, stream);
+            if let Err(e) = std::io::stdout().write_all(formatted.as_bytes()) {
+                fatal!("stdout write error, {e}");
+            }
+        }
+    } else if let Some(glob) = args.files {
+        if args.manifest_path.is_some() || args.package.is_some() {
+            fatal!("--files must not be set when crate is set");
+        }
+
+        for file in glob::glob(&glob).unwrap_or_else(|e| fatal!("{e}")) {
+            let file = file.unwrap_or_else(|e| fatal!("{e}"));
+            if let Err(e) = util::cmd("rustfmt", &["--edition", "2021", check, &file.as_os_str().to_string_lossy()], &[]) {
+                fatal!("{e}");
+            }
+            custom_fmt_files.push(file);
+        }
+    } else {
+        if let Some(pkg) = args.package {
+            if args.manifest_path.is_some() {
+                fatal!("expected only one of --package, --manifest-path");
+            }
+            match util::manifest_path_from_package(&pkg) {
+                Some(m) => args.manifest_path = Some(m),
+                None => fatal!("package `{pkg}` not found in workspace"),
+            }
+        }
+        if let Some(path) = args.manifest_path {
+            if let Err(e) = util::cmd("cargo fmt --manifest-path", &[&path, check], &[]) {
+                fatal!("{e}");
+            }
+
+            let files = Path::new(&path)
+                .parent()
+                .unwrap()
+                .join("**/*.rs")
+                .display()
+                .to_string()
+                .replace('\\', "/");
+            for file in glob::glob(&files).unwrap_or_else(|e| fatal!("{e}")) {
+                let file = file.unwrap_or_else(|e| fatal!("{e}"));
+                custom_fmt_files.push(file);
+            }
+        } else {
+            if let Err(e) = util::cmd("cargo fmt", &[check], &[]) {
+                fatal!("{e}");
+            }
+
+            for path in util::workspace_manifest_paths() {
+                let files = path.parent().unwrap().join("**/*.rs").display().to_string().replace('\\', "/");
+                for file in glob::glob(&files).unwrap_or_else(|e| fatal!("{e}")) {
+                    let file = file.unwrap_or_else(|e| fatal!("{e}"));
+                    custom_fmt_files.push(file);
+                }
+            }
+        }
+    }
+
+    custom_fmt_files.par_iter().for_each(|file| {
+        if let Err(e) = custom_fmt(file, args.check) {
+            fatal!("error {action} `{}`, {e}", file.display());
+        }
+    });
+}
+
+fn custom_fmt(rs_file: &Path, check: bool) -> io::Result<()> {
+    let file = fs::read_to_string(rs_file)?;
+
+    // skip UTF-8 BOM
+    let file_code = file.strip_prefix('\u{feff}').unwrap_or(file.as_str());
+    // skip shebang line
+    let file_code = if file_code.starts_with("#!") {
+        &file_code[file_code.find('\n').unwrap_or(file_code.len())..]
+    } else {
+        file_code
+    };
+
+    let mut formatted_code = file[..file.len() - file_code.len()].to_owned();
+    formatted_code.reserve(file.len());
+
+    let file_stream: TokenStream = file_code
+        .parse()
+        .unwrap_or_else(|e| fatal!("cannot parse `{}`, {e}", rs_file.display()));
+
+    formatted_code.push_str(&fmt_code(file_code, file_stream));
+
+    if formatted_code != file {
+        if check {
+            fatal!("extended format does not match in file `{}`", rs_file.display());
+        }
+        fs::write(rs_file, formatted_code)?;
+    }
+
+    Ok(())
+}
+
+fn fmt_code(code: &str, stream: TokenStream) -> String {
+    let mut formatted_code = String::new();
+    let mut last_already_fmt_start = 0;
+
+    let mut stream_stack = vec![stream.into_iter()];
+    let next = |stack: &mut Vec<proc_macro2::token_stream::IntoIter>| {
+        while !stack.is_empty() {
+            let tt = stack.last_mut().unwrap().next();
+            if tt.is_some() {
+                return tt;
+            }
+            stack.pop();
+        }
+        None
+    };
+    let mut tail2 = Vec::with_capacity(2);
+
+    let mut skip_next_group = false;
+    while let Some(tt) = next(&mut stream_stack) {
+        match tt {
+            TokenTree::Group(g) => {
+                if tail2.len() == 2
+                    && matches!(g.delimiter(), Delimiter::Brace)
+                    && matches!(&tail2[0], TokenTree::Punct(p) if p.as_char() == '!')
+                    && matches!(&tail2[1], TokenTree::Ident(_))
+                {
+                    // macro! {}
+                    if std::mem::take(&mut skip_next_group) {
+                        continue;
+                    }
+
+                    let bang = tail2[0].span().byte_range().start;
+                    let line_start = code[..bang].rfind('\n').unwrap_or(0);
+                    let base_indent = code[line_start..bang]
+                        .chars()
+                        .skip_while(|&c| c != ' ')
+                        .take_while(|&c| c == ' ')
+                        .count();
+
+                    let group_bytes = g.span().byte_range();
+                    let group_code = &code[group_bytes.clone()];
+
+                    if let Some(formatted) = try_fmt_macro(base_indent, group_code) {
+                        if formatted != group_code {
+                            // changed by custom format
+                            if let Some(stable) = try_fmt_macro(base_indent, &formatted) {
+                                if formatted == stable {
+                                    // change is sable
+                                    let already_fmt = &code[last_already_fmt_start..group_bytes.start];
+                                    formatted_code.push_str(already_fmt);
+                                    formatted_code.push_str(&formatted);
+                                    last_already_fmt_start = group_bytes.end;
+                                }
+                            }
+                        }
+                    }
+                } else if !tail2.is_empty()
+                    && matches!(g.delimiter(), Delimiter::Bracket)
+                    && matches!(&tail2[0], TokenTree::Punct(p) if p.as_char() == '#')
+                {
+                    // #[..]
+                    let mut attr = g.stream().into_iter();
+                    let attr = [attr.next(), attr.next(), attr.next(), attr.next(), attr.next()];
+                    if let [Some(TokenTree::Ident(i0)), Some(TokenTree::Punct(p0)), Some(TokenTree::Punct(p1)), Some(TokenTree::Ident(i1)), None] =
+                        attr
+                    {
+                        if i0 == "rustfmt" && p0.as_char() == ':' && p1.as_char() == ':' && i1 == "skip" {
+                            // #[rustfmt::skip]
+                            skip_next_group = true;
+                        }
+                    }
+                } else if !std::mem::take(&mut skip_next_group) {
+                    stream_stack.push(g.stream().into_iter());
+                }
+                tail2.clear();
+            }
+            tt => {
+                if tail2.len() == 2 {
+                    tail2.pop();
+                }
+                tail2.insert(0, tt);
+            }
+        }
+    }
+
+    formatted_code.push_str(&code[last_already_fmt_start..]);
+
+    if formatted_code != code {
+        // custom format can cause normal format to change
+        // example: ui_vec![Wgt!{<many properties>}, Wgt!{<same>}]
+        //   Wgt! gets custom formatted onto multiple lines, that causes ui_vec![\n by normal format.
+        formatted_code = rustfmt_stdin_frag(&formatted_code).unwrap_or(formatted_code);
+    }
+
+    formatted_code
+}
+
+fn try_fmt_macro(base_indent: usize, group_code: &str) -> Option<String> {
+    let mut replaced_code = replace_event_args(group_code, false);
+    let is_event_args = matches!(&replaced_code, Cow::Owned(_));
+
+    let mut is_widget = false;
+    if !is_event_args {
+        replaced_code = replace_widget_when(group_code, false);
+        is_widget = matches!(&replaced_code, Cow::Owned(_));
+    }
+
+    let mut is_expr_var = false;
+    if !is_event_args && !is_widget {
+        replaced_code = replace_expr_var(group_code, false);
+        is_expr_var = matches!(&replaced_code, Cow::Owned(_));
+    }
+
+    let code = rustfmt_stdin_frag(&replaced_code)?;
+
+    let code = if is_event_args {
+        replace_event_args(&code, true)
+    } else if is_widget {
+        replace_widget_when(&code, true)
+    } else if is_expr_var {
+        replace_expr_var(&code, true)
+    } else {
+        Cow::Owned(code)
+    };
+
+    let code_stream: TokenStream = code.parse().unwrap_or_else(|e| panic!("{e}\ncode:\n{code}"));
+    let code_tt = code_stream.into_iter().next().unwrap();
+    let code_stream = match code_tt {
+        TokenTree::Group(g) => g.stream(),
+        _ => unreachable!(),
+    };
+    let code = fmt_code(&code, code_stream);
+
+    let mut out = String::new();
+    let mut lb_indent = String::with_capacity(base_indent + 1);
+    for line in code.lines() {
+        if line.is_empty() {
+            if !lb_indent.is_empty() {
+                out.push('\n');
+            }
+        } else {
+            out.push_str(&lb_indent);
+        }
+        out.push_str(line);
+        // "\n    "
+        if lb_indent.is_empty() {
+            lb_indent.push('\n');
+            for _ in 0..base_indent {
+                lb_indent.push(' ');
+            }
+        }
+    }
+    Some(out)
+}
+// replace line with only `..` tokens with:
+//
+// ```
+// // cargo-zng::fmt::dot_dot
+// }
+// impl CargoZngFmt {
+//
+// ```
+fn replace_event_args(code: &str, reverse: bool) -> Cow<str> {
+    static RGX: Lazy<Regex> = Lazy::new(|| Regex::new(r"(?m)^\s*(\.\.)\s*$").unwrap());
+    static MARKER: &str = "// cargo-zng::fmt::dot_dot\n}\nimpl CargoZngFmt {\n";
+    static RGX_REV: Lazy<Regex> =
+        Lazy::new(|| Regex::new(r"(?m)^(\s+)// cargo-zng::fmt::dot_dot\n\s*}\n\s*impl CargoZngFmt\s*\{\n").unwrap());
+
+    if !reverse {
+        RGX.replace_all(code, |caps: &regex::Captures| {
+            format!(
+                "{}{MARKER}{}",
+                &caps[0][..caps.get(1).unwrap().start() - caps.get(0).unwrap().start()],
+                &caps[0][caps.get(1).unwrap().end() - caps.get(0).unwrap().start()..]
+            )
+        })
+    } else {
+        RGX_REV.replace_all(code, "\n$1..\n\n")
+    }
+}
+// replace `when <expr> { <properties> }` with `for cargo_zng_fmt_when in <expr> { <properties> }`
+// AND replace `#expr` with `__P_expr` AND `#{var}` with `__P_!{`
+fn replace_widget_when(code: &str, reverse: bool) -> Cow<str> {
+    static RGX: Lazy<Regex> = Lazy::new(|| Regex::new(r"(?s)\n\s*(when) .+?\{").unwrap());
+    static MARKER: &str = "for cargo_zng_fmt_when in";
+    static POUND_MARKER: &str = "__P_";
+
+    if !reverse {
+        RGX.replace(code, |caps: &regex::Captures| {
+            let prefix_spaces = &caps[0][..caps.get(1).unwrap().start() - caps.get(0).unwrap().start()];
+
+            let expr = &caps[0][caps.get(1).unwrap().end() - caps.get(0).unwrap().start()..];
+            let expr = POUND_RGX.replace_all(expr, |caps: &regex::Captures| {
+                let c = &caps[0][caps.get(1).unwrap().end() - caps.get(0).unwrap().start()..];
+                let marker = if c == "{" { POUND_VAR_MARKER } else { POUND_MARKER };
+                format!("{marker}{c}")
+            });
+
+            format!("{prefix_spaces}{MARKER}{expr}")
+        })
+    } else {
+        let code = code.replace(MARKER, "when");
+        let r = POUND_REV_RGX.replace_all(&code, "#").into_owned();
+        Cow::Owned(r)
+    }
+}
+static POUND_RGX: Lazy<Regex> = Lazy::new(|| Regex::new(r"(#)[\w\{]").unwrap());
+static POUND_REV_RGX: Lazy<Regex> = Lazy::new(|| Regex::new(r"__P_!?\s?").unwrap());
+static POUND_VAR_MARKER: &str = "__P_!";
+
+// replace `#{` with `__P_!{`
+fn replace_expr_var(code: &str, reverse: bool) -> Cow<str> {
+    if !reverse {
+        POUND_RGX.replace(code, |caps: &regex::Captures| {
+            let c = &caps[0][caps.get(1).unwrap().end() - caps.get(0).unwrap().start()..];
+            if c == "{" {
+                Cow::Borrowed("__P_!{")
+            } else {
+                Cow::Owned(caps[0].to_owned())
+            }
+        })
+    } else {
+        POUND_REV_RGX.replace(code, "#")
+    }
+}
+
+fn rustfmt_stdin_frag(code: &str) -> Option<String> {
+    let mut s = std::process::Command::new("rustfmt")
+        .arg("--edition")
+        .arg("2021")
+        .stdin(Stdio::piped())
+        .stdout(Stdio::piped())
+        .stderr(Stdio::piped())
+        .spawn()
+        .ok()?;
+    s.stdin.take().unwrap().write_all(format!("fn __try_fmt(){code}").as_bytes()).ok()?;
+    let s = s.wait_with_output().ok()?;
+
+    if s.status.success() {
+        let code = String::from_utf8(s.stdout).ok()?;
+        let code = code.strip_prefix("fn __try_fmt()")?.trim_start().to_owned();
+        Some(code)
+    } else {
+        None
+    }
+}
+
+fn rustfmt_stdin(code: &str) -> Option<String> {
+    let mut s = std::process::Command::new("rustfmt")
+        .arg("--edition")
+        .arg("2021")
+        .stdin(Stdio::piped())
+        .stdout(Stdio::piped())
+        .spawn()
+        .ok()?;
+    s.stdin.take().unwrap().write_all(code.as_bytes()).ok()?;
+    let s = s.wait_with_output().ok()?;
+
+    if s.status.success() {
+        let code = String::from_utf8(s.stdout).ok()?;
+        Some(code)
+    } else {
+        None
+    }
+}
diff --git a/crates/cargo-zng/src/main.rs b/crates/cargo-zng/src/main.rs
index 268509bb7..a105003e1 100644
--- a/crates/cargo-zng/src/main.rs
+++ b/crates/cargo-zng/src/main.rs
@@ -11,6 +11,7 @@
 
 #[macro_use]
 mod util;
+mod fmt;
 mod l10n;
 mod new;
 mod res;
@@ -46,6 +47,10 @@ struct Zng {
 
 #[derive(Subcommand, Debug)]
 enum Command {
+    /// Format code and macros
+    ///
+    /// Runs cargo fmt and formats Zng macros
+    Fmt(fmt::FmtArgs),
     /// New project from a Zng template repository.
     New(new::NewArgs),
     /// Localization text scraper
@@ -66,6 +71,7 @@ fn main() {
     let CargoCli::Zng(cli) = CargoCli::parse();
 
     match cli.command {
+        Command::Fmt(args) => fmt::run(args),
         Command::New(args) => new::run(args),
         Command::L10n(args) => l10n::run(args),
         Command::Res(args) => res::run(args),
diff --git a/crates/cargo-zng/src/new.rs b/crates/cargo-zng/src/new.rs
index f6663dbcf..2cfed5150 100644
--- a/crates/cargo-zng/src/new.rs
+++ b/crates/cargo-zng/src/new.rs
@@ -105,11 +105,12 @@ pub fn run(args: NewArgs) {
         util::exit();
     }
 
-    // cargo fmt
+    // cargo zng fmt
     if Path::new(&project_name).join("Cargo.toml").exists() {
-        if let Err(e) = std::env::set_current_dir(project_name).and_then(|_| util::cmd("cargo fmt", &[], &[])) {
-            fatal!("cannot cargo fmt generated project, {e}")
+        if let Err(e) = std::env::set_current_dir(project_name) {
+            fatal!("cannot format generated project, {e}")
         }
+        crate::fmt::run(crate::fmt::FmtArgs::default());
     }
 }
 
diff --git a/crates/cargo-zng/src/util.rs b/crates/cargo-zng/src/util.rs
index d0f8721c7..feb1e86dc 100644
--- a/crates/cargo-zng/src/util.rs
+++ b/crates/cargo-zng/src/util.rs
@@ -89,7 +89,7 @@ fn cmd_impl(line: &str, args: &[&str], env: &[(&str, &str)], silent: bool) -> io
             })
             .filter(|a| !a.is_empty()),
     );
-    cmd.args(args);
+    cmd.args(args.iter().filter(|a| !a.is_empty()));
     for (key, val) in env.iter() {
         cmd.env(key, val);
     }
@@ -209,6 +209,36 @@ pub fn manifest_path_from_package(package: &str) -> Option<String> {
     None
 }
 
+/// Workspace crates Cargo.toml paths.
+pub fn workspace_manifest_paths() -> Vec<PathBuf> {
+    let metadata = match Command::new("cargo")
+        .args(["metadata", "--format-version", "1", "--no-deps"])
+        .stderr(Stdio::inherit())
+        .output()
+    {
+        Ok(m) => {
+            if !m.status.success() {
+                fatal!("cargo metadata error")
+            }
+            String::from_utf8_lossy(&m.stdout).into_owned()
+        }
+        Err(e) => fatal!("cargo metadata error, {e}"),
+    };
+
+    #[derive(Deserialize)]
+    struct Metadata {
+        packages: Vec<Package>,
+    }
+    #[derive(Debug, Deserialize)]
+    struct Package {
+        manifest_path: PathBuf,
+    }
+
+    let metadata: Metadata = serde_json::from_str(&metadata).unwrap_or_else(|e| fatal!("unexpected cargo metadata format, {e}"));
+
+    metadata.packages.into_iter().map(|p| p.manifest_path).collect()
+}
+
 /// Workspace root and dependencies of manifest_path
 pub fn dependencies(manifest_path: &str) -> (PathBuf, Vec<DependencyManifest>) {
     let metadata = match Command::new("cargo")
diff --git a/crates/zng-app-context/src/lib.rs b/crates/zng-app-context/src/lib.rs
index 5465fc503..037577816 100644
--- a/crates/zng-app-context/src/lib.rs
+++ b/crates/zng-app-context/src/lib.rs
@@ -413,9 +413,7 @@ impl LocalContext {
     }
 }
 thread_local! {
-    static LOCAL: RefCell<LocalData> = const {
-        RefCell::new(new_local_data())
-    };
+    static LOCAL: RefCell<LocalData> = const { RefCell::new(new_local_data()) };
 }
 
 trait LocalKeyDyn {
diff --git a/crates/zng-app-proc-macros/src/util.rs b/crates/zng-app-proc-macros/src/util.rs
index e816a39bb..d781b1c95 100644
--- a/crates/zng-app-proc-macros/src/util.rs
+++ b/crates/zng-app-proc-macros/src/util.rs
@@ -237,7 +237,9 @@ macro_rules! non_user_error {
         panic!("[{}:{}] invalid non-user input: {}", file!(), line!(), $e)
     };
     ($fmt:tt, $($args:tt)+) => {
-        non_user_error! { format_args!($fmt, $($args)+) }
+        non_user_error! {
+            format_args!($fmt, $($args)+)
+        }
     }
 }
 
diff --git a/crates/zng-app/src/access.rs b/crates/zng-app/src/access.rs
index a032c9bc5..cbffbca7b 100644
--- a/crates/zng-app/src/access.rs
+++ b/crates/zng-app/src/access.rs
@@ -94,18 +94,18 @@ event_args! {
         }
     }
 
-        /// Arguments for the [`ACCESS_DEINITED_EVENT`].
-        pub struct AccessDeinitedArgs {
-            /// Target window.
-            pub window_id: WindowId,
+    /// Arguments for the [`ACCESS_DEINITED_EVENT`].
+    pub struct AccessDeinitedArgs {
+        /// Target window.
+        pub window_id: WindowId,
 
-            ..
+        ..
 
-            /// Event is broadcast.
-            fn delivery_list(&self, list: &mut UpdateDeliveryList) {
-                list.search_all()
-            }
+        /// Event is broadcast.
+        fn delivery_list(&self, list: &mut UpdateDeliveryList) {
+            list.search_all()
         }
+    }
 
     /// Arguments for the [`ACCESS_CLICK_EVENT`].
     pub struct AccessClickArgs {
diff --git a/crates/zng-app/src/render.rs b/crates/zng-app/src/render.rs
index ef519101e..18614cdaf 100644
--- a/crates/zng-app/src/render.rs
+++ b/crates/zng-app/src/render.rs
@@ -2975,6 +2975,10 @@ impl Default for FontSynthesis {
 impl_from_and_into_var! {
     /// Convert to full [`ENABLED`](FontSynthesis::ENABLED) or [`DISABLED`](FontSynthesis::DISABLED).
     fn from(enabled: bool) -> FontSynthesis {
-        if enabled { FontSynthesis::ENABLED } else { FontSynthesis::DISABLED }
+        if enabled {
+            FontSynthesis::ENABLED
+        } else {
+            FontSynthesis::DISABLED
+        }
     }
 }
diff --git a/crates/zng-app/src/running.rs b/crates/zng-app/src/running.rs
index ba71257fc..d5849c2fb 100644
--- a/crates/zng-app/src/running.rs
+++ b/crates/zng-app/src/running.rs
@@ -1560,7 +1560,9 @@ event_args! {
     ///
     /// Requesting `propagation().stop()` on this event cancels the exit.
     pub struct ExitRequestedArgs {
+
         ..
+
         /// Broadcast to all.
         fn delivery_list(&self, list: &mut UpdateDeliveryList) {
             list.search_all()
diff --git a/crates/zng-app/src/third_party.rs b/crates/zng-app/src/third_party.rs
index d7073dbce..5168cf7f0 100644
--- a/crates/zng-app/src/third_party.rs
+++ b/crates/zng-app/src/third_party.rs
@@ -77,7 +77,10 @@ impl LICENSES {
 }
 
 app_local! {
-    static LICENSES_SV: Licenses = Licenses { sources: vec![], include_view_process: var(true), };
+    static LICENSES_SV: Licenses = Licenses {
+        sources: vec![],
+        include_view_process: var(true),
+    };
 }
 
 struct Licenses {
diff --git a/crates/zng-app/src/timer.rs b/crates/zng-app/src/timer.rs
index a231fff59..cc1039a53 100644
--- a/crates/zng-app/src/timer.rs
+++ b/crates/zng-app/src/timer.rs
@@ -66,7 +66,7 @@ struct TimerVarEntry {
 }
 
 app_local! {
-   pub(crate) static TIMERS_SV: TimersService = const { TimersService::new() };
+    pub(crate) static TIMERS_SV: TimersService = const { TimersService::new() };
 }
 
 pub(crate) struct TimersService {
diff --git a/crates/zng-app/src/view_process/raw_events.rs b/crates/zng-app/src/view_process/raw_events.rs
index 9a63371f8..e6fe36dcc 100644
--- a/crates/zng-app/src/view_process/raw_events.rs
+++ b/crates/zng-app/src/view_process/raw_events.rs
@@ -219,6 +219,7 @@ event_args! {
         pub window_id: WindowId,
         /// Error message from the view-process.
         pub error: Txt,
+
         ..
 
         /// Broadcast to all widgets.
@@ -404,7 +405,7 @@ event_args! {
 
         /// Broadcast to all widgets.
         fn delivery_list(&self, list: &mut UpdateDeliveryList) {
-           list.search_all();
+            list.search_all();
         }
     }
 
@@ -518,6 +519,7 @@ event_args! {
 
     /// [`RAW_FONT_CHANGED_EVENT`] arguments.
     pub struct RawFontChangedArgs {
+
         ..
 
         /// Broadcast to all widgets.
@@ -613,7 +615,7 @@ event_args! {
 
         /// Broadcast to all widgets.
         fn delivery_list(&self, list: &mut UpdateDeliveryList) {
-           list.search_all();
+            list.search_all();
         }
     }
 
@@ -634,6 +636,7 @@ event_args! {
 
     /// Arguments for [`LOW_MEMORY_EVENT`].
     pub struct LowMemoryArgs {
+
         ..
 
         /// Broadcast to all widgets.
diff --git a/crates/zng-app/src/widget.rs b/crates/zng-app/src/widget.rs
index fa195f682..220ac9ced 100644
--- a/crates/zng-app/src/widget.rs
+++ b/crates/zng-app/src/widget.rs
@@ -466,13 +466,17 @@ macro_rules! widget_set {
         $(#[$skip:meta])*
         $($invalid:ident)::+ = $($tt:tt)*
     ) => {
-        compile_error!{"expected `&mut <wgt>;` at the beginning"}
+        compile_error!{
+            "expected `&mut <wgt>;` at the beginning"
+        }
     };
     (
         $(#[$skip:meta])*
         when = $($invalid:tt)*
     ) => {
-        compile_error!{"expected `&mut <wgt>;` at the beginning"}
+        compile_error!{
+            "expected `&mut <wgt>;` at the beginning"
+        }
     };
     (
         $wgt_mut:ident;
diff --git a/crates/zng-app/src/widget/border.rs b/crates/zng-app/src/widget/border.rs
index 40a9616af..3af16fa65 100644
--- a/crates/zng-app/src/widget/border.rs
+++ b/crates/zng-app/src/widget/border.rs
@@ -348,7 +348,7 @@ impl_from_and_into_var! {
     fn from(percent: FactorPercent) -> CornerRadius {
         CornerRadius::new_all(percent)
     }
-   /// All corners same relative length.
+    /// All corners same relative length.
     fn from(norm: Factor) -> CornerRadius {
         CornerRadius::new_all(norm)
     }
@@ -364,14 +364,19 @@ impl_from_and_into_var! {
 
     /// (top-left, top-right, bottom-left, bottom-right) corners.
     fn from<TL: Into<Size>, TR: Into<Size>, BR: Into<Size>, BL: Into<Size>>(
-        (top_left, top_right, bottom_right, bottom_left): (TL, TR, BR, BL)
+        (top_left, top_right, bottom_right, bottom_left): (TL, TR, BR, BL),
     ) -> CornerRadius {
         CornerRadius::new(top_left, top_right, bottom_right, bottom_left)
     }
 
     /// From layout corner-radius.
     fn from(corner_radius: PxCornerRadius) -> CornerRadius {
-        CornerRadius::new(corner_radius.top_left, corner_radius.top_right, corner_radius.bottom_right, corner_radius.bottom_left)
+        CornerRadius::new(
+            corner_radius.top_left,
+            corner_radius.top_right,
+            corner_radius.bottom_right,
+            corner_radius.bottom_left,
+        )
     }
 }
 
@@ -574,7 +579,7 @@ impl_from_and_into_var! {
 
     /// (top, right, bottom, left) sides.
     fn from<T: Into<BorderSide>, R: Into<BorderSide>, B: Into<BorderSide>, L: Into<BorderSide>>(
-        (top, right, bottom, left): (T, R, B, L)
+        (top, right, bottom, left): (T, R, B, L),
     ) -> BorderSides {
         BorderSides::new(top, right, bottom, left)
     }
@@ -587,15 +592,10 @@ impl_from_and_into_var! {
 
     /// (top-color, right-color, bottom-color, left-color, style) sides.
     fn from<T: Into<Rgba>, R: Into<Rgba>, B: Into<Rgba>, L: Into<Rgba>, S: Into<BorderStyle>>(
-        (top, right, bottom, left, style): (T, R, B, L, S)
+        (top, right, bottom, left, style): (T, R, B, L, S),
     ) -> BorderSides {
         let style = style.into();
-        BorderSides::new(
-            (top, style),
-            (right, style),
-            (bottom, style),
-            (left, style),
-        )
+        BorderSides::new((top, style), (right, style), (bottom, style), (left, style))
     }
 }
 
diff --git a/crates/zng-app/src/widget/info.rs b/crates/zng-app/src/widget/info.rs
index 05e3b7a9d..e4f1622e4 100644
--- a/crates/zng-app/src/widget/info.rs
+++ b/crates/zng-app/src/widget/info.rs
@@ -2177,7 +2177,11 @@ impl_from_and_into_var! {
     /// * `true` -> `Visible`
     /// * `false` -> `Collapsed`
     fn from(visible: bool) -> Visibility {
-        if visible { Visibility::Visible } else { Visibility::Collapsed }
+        if visible {
+            Visibility::Visible
+        } else {
+            Visibility::Collapsed
+        }
     }
 }
 
diff --git a/crates/zng-app/src/widget/info/builder.rs b/crates/zng-app/src/widget/info/builder.rs
index daf90f6e1..2002f8ba2 100644
--- a/crates/zng-app/src/widget/info/builder.rs
+++ b/crates/zng-app/src/widget/info/builder.rs
@@ -401,8 +401,8 @@ crate::event::event! {
 }
 
 crate::event::event_args! {
-     /// [`WIDGET_INFO_CHANGED_EVENT`] args.
-     pub struct WidgetInfoChangedArgs {
+    /// [`WIDGET_INFO_CHANGED_EVENT`] args.
+    pub struct WidgetInfoChangedArgs {
         /// Window ID.
         pub window_id: WindowId,
 
diff --git a/crates/zng-color/src/gradient.rs b/crates/zng-color/src/gradient.rs
index b75fb930f..05382a4e6 100644
--- a/crates/zng-color/src/gradient.rs
+++ b/crates/zng-color/src/gradient.rs
@@ -224,7 +224,7 @@ impl_from_and_into_var! {
         GradientRadius {
             base,
             circle: false,
-            radii: Size::fill()
+            radii: Size::fill(),
         }
     }
 
@@ -233,7 +233,7 @@ impl_from_and_into_var! {
         GradientRadius {
             base: base.into(),
             circle: false,
-            radii: Size::splat(radius)
+            radii: Size::splat(radius),
         }
     }
 
@@ -1117,17 +1117,17 @@ impl_from_and_into_var! {
     }
 
     /// [`GradientStops::from_colors`]
-    fn from< const N: usize>(colors: &[Rgba; N]) -> GradientStops {
+    fn from<const N: usize>(colors: &[Rgba; N]) -> GradientStops {
         GradientStops::from_colors(colors)
     }
 
     /// [`GradientStops::from_colors`]
-    fn from< const N: usize>(colors: &[Hsla; N]) -> GradientStops {
+    fn from<const N: usize>(colors: &[Hsla; N]) -> GradientStops {
         GradientStops::from_colors(colors)
     }
 
     /// [`GradientStops::from_colors`]
-    fn from< const N: usize>(colors: &[Hsva; N]) -> GradientStops {
+    fn from<const N: usize>(colors: &[Hsva; N]) -> GradientStops {
         GradientStops::from_colors(colors)
     }
 
diff --git a/crates/zng-color/src/lib.rs b/crates/zng-color/src/lib.rs
index e108761b0..56b38c5f9 100644
--- a/crates/zng-color/src/lib.rs
+++ b/crates/zng-color/src/lib.rs
@@ -474,11 +474,7 @@ impl_from_and_into_var! {
         let saturation = clamp_normal(hsla.saturation);
 
         let value = lightness + saturation * lightness.min(1.0 - lightness);
-        let saturation = if value <= EPSILON {
-            0.0
-        } else {
-            2.0 * (1.0 - lightness / value)
-        };
+        let saturation = if value <= EPSILON { 0.0 } else { 2.0 * (1.0 - lightness / value) };
 
         Hsva {
             hue: hsla.hue,
diff --git a/crates/zng-env-proc-macros/src/lib.rs b/crates/zng-env-proc-macros/src/lib.rs
index 274d929cc..b09d8b190 100644
--- a/crates/zng-env-proc-macros/src/lib.rs
+++ b/crates/zng-env-proc-macros/src/lib.rs
@@ -26,14 +26,20 @@ pub fn init_parse(crate_: TokenStream) -> TokenStream {
         Ok(m) => PathBuf::from(m).join("Cargo.toml"),
         Err(e) => {
             let msg = format!("missing CARGO_MANIFEST_DIR, {e}");
-            return quote! { compile_error!(#msg) }.into();
+            return quote! {
+                compile_error!(#msg)
+            }
+            .into();
         }
     };
     let manifest_str = match std::fs::read_to_string(&manifest) {
         Ok(s) => s,
         Err(e) => {
             let msg = format!("cannot read `{}`, {e}", manifest.display());
-            return quote! { compile_error!(#msg) }.into();
+            return quote! {
+                compile_error!(#msg)
+            }
+            .into();
         }
     };
 
@@ -41,7 +47,10 @@ pub fn init_parse(crate_: TokenStream) -> TokenStream {
         Ok(m) => m,
         Err(e) => {
             let msg = format!("cannot parse Cargo.toml manifest, {e}");
-            return quote! { compile_error!(#msg) }.into();
+            return quote! {
+                compile_error!(#msg)
+            }
+            .into();
         }
     };
     let p_name = m.package.name;
diff --git a/crates/zng-ext-fs-watcher/src/lib.rs b/crates/zng-ext-fs-watcher/src/lib.rs
index e0d4354c8..5c79c4251 100644
--- a/crates/zng-ext-fs-watcher/src/lib.rs
+++ b/crates/zng-ext-fs-watcher/src/lib.rs
@@ -886,7 +886,7 @@ impl FsChange {
 }
 
 event_args! {
-     /// [`FS_CHANGES_EVENT`] arguments.
+    /// [`FS_CHANGES_EVENT`] arguments.
     pub struct FsChangesArgs {
         /// All notify changes since the last event.
         pub changes: Arc<Vec<FsChange>>,
diff --git a/crates/zng-ext-hot-reload/src/lib.rs b/crates/zng-ext-hot-reload/src/lib.rs
index e42785d62..270e46ba8 100644
--- a/crates/zng-ext-hot-reload/src/lib.rs
+++ b/crates/zng-ext-hot-reload/src/lib.rs
@@ -490,8 +490,8 @@ app_local! {
             libs: vec![],
             rebuilders: Mutex::new(vec![]),
             status: zng_var::var(vec![]),
-            rebuild_requests: vec![] ,
-            cancel_requests: vec![] ,
+            rebuild_requests: vec![],
+            cancel_requests: vec![],
         }
     };
 }
diff --git a/crates/zng-ext-image/src/types.rs b/crates/zng-ext-image/src/types.rs
index 6513ede38..cea0296ca 100644
--- a/crates/zng-ext-image/src/types.rs
+++ b/crates/zng-ext-image/src/types.rs
@@ -712,7 +712,7 @@ impl_from_and_into_var! {
 
     /// Same as conversion from `&str`.
     fn from(s: String) -> ImageSource {
-       s.as_str().into()
+        s.as_str().into()
     }
     /// Same as conversion from `&str`.
     fn from(s: Txt) -> ImageSource {
diff --git a/crates/zng-ext-input/src/focus.rs b/crates/zng-ext-input/src/focus.rs
index c0abd7eb7..b3ffa438f 100644
--- a/crates/zng-ext-input/src/focus.rs
+++ b/crates/zng-ext-input/src/focus.rs
@@ -73,7 +73,7 @@ event_args! {
         /// The scope that returns the focus when focused directly.
         ///
         /// Is `None` if the previous focus was the return focus of a scope that was removed.
-        pub scope : Option<InteractionPath>,
+        pub scope: Option<InteractionPath>,
 
         /// Previous return focus of the widget.
         pub prev_return: Option<InteractionPath>,
diff --git a/crates/zng-ext-input/src/gesture.rs b/crates/zng-ext-input/src/gesture.rs
index 4690f8cff..882330bec 100644
--- a/crates/zng-ext-input/src/gesture.rs
+++ b/crates/zng-ext-input/src/gesture.rs
@@ -160,9 +160,7 @@ event_args! {
         ..
 
         /// No target, only app extensions.
-        fn delivery_list(&self, _list: &mut UpdateDeliveryList) {
-
-        }
+        fn delivery_list(&self, _list: &mut UpdateDeliveryList) {}
     }
 }
 impl From<MouseClickArgs> for ClickArgs {
diff --git a/crates/zng-ext-input/src/mouse.rs b/crates/zng-ext-input/src/mouse.rs
index 259dffaba..432621a91 100644
--- a/crates/zng-ext-input/src/mouse.rs
+++ b/crates/zng-ext-input/src/mouse.rs
@@ -149,7 +149,7 @@ event_args! {
         /// Position of the mouse in the coordinates of [`target`](MouseClickArgs::target).
         pub position: DipPoint,
 
-         /// What modifier keys where pressed when this event happened.
+        /// What modifier keys where pressed when this event happened.
         pub modifiers: ModifiersState,
 
         /// Count of clicks within the double-click interval. Number `1` is single click, `2` is double click, etc.
@@ -251,7 +251,7 @@ event_args! {
 
         /// Position of the mouse in the coordinates of [`target`](MouseWheelArgs::target).
         pub position: DipPoint,
-         /// What modifier keys where pressed when this event happened.
+        /// What modifier keys where pressed when this event happened.
         pub modifiers: ModifiersState,
 
         /// Wheel motion delta, value is in pixels if the *wheel* is a touchpad.
@@ -1492,7 +1492,14 @@ app_local! {
         MouseService {
             multi_click_config: sys_multi_click_config.cow(),
             sys_multi_click_config,
-            repeat_config: KEYBOARD.repeat_config().map(|c| ButtonRepeatConfig { start_delay: c.start_delay, interval: c.interval }).cow().boxed(),
+            repeat_config: KEYBOARD
+                .repeat_config()
+                .map(|c| ButtonRepeatConfig {
+                    start_delay: c.start_delay,
+                    interval: c.interval,
+                })
+                .cow()
+                .boxed(),
             buttons: var(vec![]),
             hovered: var(None),
             position: var(None),
diff --git a/crates/zng-ext-input/src/touch.rs b/crates/zng-ext-input/src/touch.rs
index 767f486e8..1dddf4e11 100644
--- a/crates/zng-ext-input/src/touch.rs
+++ b/crates/zng-ext-input/src/touch.rs
@@ -469,45 +469,45 @@ event_args! {
         }
     }
 
-        /// Arguments for [`TOUCH_LONG_PRESS_EVENT`].
-        pub struct TouchLongPressArgs {
-            /// Id of window that received the event.
-            pub window_id: WindowId,
+    /// Arguments for [`TOUCH_LONG_PRESS_EVENT`].
+    pub struct TouchLongPressArgs {
+        /// Id of window that received the event.
+        pub window_id: WindowId,
 
-            /// Id of device that generated the event.
-            pub device_id: DeviceId,
+        /// Id of device that generated the event.
+        pub device_id: DeviceId,
 
-            /// Identify the touch contact or *finger*.
-            ///
-            /// Multiple points of contact can happen in the same device at the same time,
-            /// this ID identifies each uninterrupted contact. IDs are unique only among other concurrent touches
-            /// on the same device, after a touch is ended an ID may be reused.
-            pub touch: TouchId,
+        /// Identify the touch contact or *finger*.
+        ///
+        /// Multiple points of contact can happen in the same device at the same time,
+        /// this ID identifies each uninterrupted contact. IDs are unique only among other concurrent touches
+        /// on the same device, after a touch is ended an ID may be reused.
+        pub touch: TouchId,
 
-            /// Center of the touch in the window's content area.
-            pub position: DipPoint,
+        /// Center of the touch in the window's content area.
+        pub position: DipPoint,
 
-            /// Hit-test result for the touch point in the window.
-            pub hits: HitTestInfo,
+        /// Hit-test result for the touch point in the window.
+        pub hits: HitTestInfo,
 
-            /// Full path to the top-most hit in [`hits`](TouchInputArgs::hits).
-            pub target: InteractionPath,
+        /// Full path to the top-most hit in [`hits`](TouchInputArgs::hits).
+        pub target: InteractionPath,
 
-            /// What modifier keys where pressed when this touch started.
-            pub modifiers: ModifiersState,
+        /// What modifier keys where pressed when this touch started.
+        pub modifiers: ModifiersState,
 
-            /// Timestamp of when the touch started.
-            pub start_time: DInstant,
+        /// Timestamp of when the touch started.
+        pub start_time: DInstant,
 
-            ..
+        ..
 
-            /// The [`target`].
-            ///
-            /// [`target`]: Self::target
-            fn delivery_list(&self, list: &mut UpdateDeliveryList) {
-                list.insert_wgt(&self.target);
-            }
+        /// The [`target`].
+        ///
+        /// [`target`]: Self::target
+        fn delivery_list(&self, list: &mut UpdateDeliveryList) {
+            list.insert_wgt(&self.target);
         }
+    }
 
     /// Arguments for [`TOUCH_TRANSFORM_EVENT`].
     pub struct TouchTransformArgs {
diff --git a/crates/zng-ext-l10n-proc-macros/src/util.rs b/crates/zng-ext-l10n-proc-macros/src/util.rs
index 4d034997a..bd534a8b4 100644
--- a/crates/zng-ext-l10n-proc-macros/src/util.rs
+++ b/crates/zng-ext-l10n-proc-macros/src/util.rs
@@ -37,7 +37,9 @@ macro_rules! non_user_error {
         panic!("[{}:{}] invalid non-user input: {}", file!(), line!(), $e)
     };
     ($fmt:tt, $($args:tt)+) => {
-        non_user_error! { format_args!($fmt, $($args)+) }
+        non_user_error! {
+            format_args!($fmt, $($args)+)
+        }
     }
 }
 
diff --git a/crates/zng-ext-single-instance/src/lib.rs b/crates/zng-ext-single-instance/src/lib.rs
index f7cd159f8..780ca0cf8 100644
--- a/crates/zng-ext-single-instance/src/lib.rs
+++ b/crates/zng-ext-single-instance/src/lib.rs
@@ -114,7 +114,7 @@ event_args! {
 
         ..
 
-        fn delivery_list(&self, _list: &mut UpdateDeliveryList) { }
+        fn delivery_list(&self, _list: &mut UpdateDeliveryList) {}
     }
 }
 impl AppInstanceArgs {
diff --git a/crates/zng-ext-window/src/monitor.rs b/crates/zng-ext-window/src/monitor.rs
index 25c57d4f6..f866942f5 100644
--- a/crates/zng-ext-window/src/monitor.rs
+++ b/crates/zng-ext-window/src/monitor.rs
@@ -16,11 +16,7 @@ use zng_view_api::window::VideoMode;
 use crate::WINDOWS;
 
 app_local! {
-    pub(super) static MONITORS_SV: MonitorsService = const {
-        MonitorsService {
-            monitors: IdMap::new(),
-        }
-    };
+    pub(super) static MONITORS_SV: MonitorsService = const { MonitorsService { monitors: IdMap::new() } };
 }
 
 /// Monitors service.
diff --git a/crates/zng-layout/src/unit/alignment.rs b/crates/zng-layout/src/unit/alignment.rs
index 750c8de2e..82fd200a3 100644
--- a/crates/zng-layout/src/unit/alignment.rs
+++ b/crates/zng-layout/src/unit/alignment.rs
@@ -205,15 +205,27 @@ impl Align {
 }
 impl_from_and_into_var! {
     fn from<X: Into<Factor>, Y: Into<Factor>>((x, y): (X, Y)) -> Align {
-        Align { x: x.into(), x_rtl_aware: false, y: y.into() }
+        Align {
+            x: x.into(),
+            x_rtl_aware: false,
+            y: y.into(),
+        }
     }
 
     fn from<X: Into<Factor>, Y: Into<Factor>>((x, rtl, y): (X, bool, Y)) -> Align {
-        Align { x: x.into(), x_rtl_aware: rtl, y: y.into() }
+        Align {
+            x: x.into(),
+            x_rtl_aware: rtl,
+            y: y.into(),
+        }
     }
 
     fn from(xy: Factor) -> Align {
-        Align { x: xy, x_rtl_aware: false, y: xy }
+        Align {
+            x: xy,
+            x_rtl_aware: false,
+            y: xy,
+        }
     }
 
     fn from(xy: FactorPercent) -> Align {
@@ -339,7 +351,7 @@ impl Align {
     }
 }
 impl_from_and_into_var! {
-     /// To relative length x and y.
+    /// To relative length x and y.
     fn from(alignment: Align) -> Point {
         Point {
             x: alignment.x.into(),
diff --git a/crates/zng-layout/src/unit/constraints.rs b/crates/zng-layout/src/unit/constraints.rs
index 6b144330e..ffdd21e4a 100644
--- a/crates/zng-layout/src/unit/constraints.rs
+++ b/crates/zng-layout/src/unit/constraints.rs
@@ -811,7 +811,7 @@ impl_from_and_into_var! {
                 PxConstraints::new_range(b.height, a.height)
             } else {
                 PxConstraints::new_range(a.height, b.height)
-            }
+            },
         }
     }
 }
diff --git a/crates/zng-layout/src/unit/factor.rs b/crates/zng-layout/src/unit/factor.rs
index e3a45dceb..26a8b90eb 100644
--- a/crates/zng-layout/src/unit/factor.rs
+++ b/crates/zng-layout/src/unit/factor.rs
@@ -498,26 +498,14 @@ impl_from_and_into_var! {
     }
 
     /// New dimension, top-bottom, left-right.
-    fn from<
-        TB: Into<Factor>,
-        LR: Into<Factor>
-        >(
-            (top_bottom, left_right): (TB, LR)
-        )
-        -> FactorSideOffsets {
+    fn from<TB: Into<Factor>, LR: Into<Factor>>((top_bottom, left_right): (TB, LR)) -> FactorSideOffsets {
         FactorSideOffsets::new_vh(top_bottom, left_right)
     }
 
     /// New top, right, bottom, left.
-    fn from<
-        T: Into<Factor>,
-        R: Into<Factor>,
-        B: Into<Factor>,
-        L: Into<Factor>
-        >(
-            (top, right, bottom, left): (T, R, B, L)
-        )
-        -> FactorSideOffsets {
+    fn from<T: Into<Factor>, R: Into<Factor>, B: Into<Factor>, L: Into<Factor>>(
+        (top, right, bottom, left): (T, R, B, L),
+    ) -> FactorSideOffsets {
         FactorSideOffsets::new(top, right, bottom, left)
     }
 }
diff --git a/crates/zng-layout/src/unit/side_offsets.rs b/crates/zng-layout/src/unit/side_offsets.rs
index 3a0fbaad8..4a16e95d3 100644
--- a/crates/zng-layout/src/unit/side_offsets.rs
+++ b/crates/zng-layout/src/unit/side_offsets.rs
@@ -134,7 +134,7 @@ impl_from_and_into_var! {
 impl_length_comp_conversions! {
     /// (top-bottom, left-right)
     fn from(top_bottom: TB, left_right: LR) -> SideOffsets {
-        SideOffsets::new_vh(top_bottom,left_right)
+        SideOffsets::new_vh(top_bottom, left_right)
     }
 
     /// (top, right, bottom, left)
diff --git a/crates/zng-layout/src/unit/transform.rs b/crates/zng-layout/src/unit/transform.rs
index 5b1bd8f1d..64d1f9eca 100644
--- a/crates/zng-layout/src/unit/transform.rs
+++ b/crates/zng-layout/src/unit/transform.rs
@@ -407,7 +407,11 @@ fn lerp_px_transform(s: PxTransform, to: &PxTransform, step: EasingStep) -> PxTr
 
 impl_from_and_into_var! {
     fn from(t: PxTransform) -> Transform {
-        Transform { parts: vec![TransformPart::Computed(t)], needs_layout: false, lerp_to: vec![] }
+        Transform {
+            parts: vec![TransformPart::Computed(t)],
+            needs_layout: false,
+            lerp_to: vec![],
+        }
     }
 }
 
diff --git a/crates/zng-task/src/lib.rs b/crates/zng-task/src/lib.rs
index 36ee8e5f1..a75b27d45 100644
--- a/crates/zng-task/src/lib.rs
+++ b/crates/zng-task/src/lib.rs
@@ -868,9 +868,7 @@ pub fn deadline(deadline: impl Into<Deadline>) -> Pin<Box<dyn Future<Output = ()
 }
 
 app_local! {
-    static DEADLINE_SV: (DeadlineService, bool) = const {
-        (default_deadline, false)
-    };
+    static DEADLINE_SV: (DeadlineService, bool) = const { (default_deadline, false) };
 }
 
 type DeadlineService = fn(Deadline) -> Pin<Box<dyn Future<Output = ()> + Send + Sync>>;
diff --git a/crates/zng-var-proc-macros/src/util.rs b/crates/zng-var-proc-macros/src/util.rs
index 9c43ca245..53132d0e0 100644
--- a/crates/zng-var-proc-macros/src/util.rs
+++ b/crates/zng-var-proc-macros/src/util.rs
@@ -92,7 +92,9 @@ macro_rules! non_user_error {
         panic!("[{}:{}] invalid non-user input: {}", file!(), line!(), $e)
     };
     ($fmt:tt, $($args:tt)+) => {
-        non_user_error! { format_args!($fmt, $($args)+) }
+        non_user_error! {
+            format_args!($fmt, $($args)+)
+        }
     }
 }
 
diff --git a/crates/zng-var/src/util.rs b/crates/zng-var/src/util.rs
index ebd57c0cc..b8da001da 100644
--- a/crates/zng-var/src/util.rs
+++ b/crates/zng-var/src/util.rs
@@ -166,7 +166,7 @@ macro_rules! __impl_from_and_into_var {
     (
         =input=>
         [$($config:tt)*]
-        ($ident:ident : $Input:ty) $($rest:tt)+
+        ($ident:ident : $Input:ty $(,)?) $($rest:tt)+
     ) => {
         $crate::__impl_from_and_into_var! {
             =output=>
@@ -181,7 +181,7 @@ macro_rules! __impl_from_and_into_var {
     (
         =input=>
         [$($config:tt)*]
-        (( $($destructure:tt)+ ) : $Input:ty) $($rest:tt)+
+        (( $($destructure:tt)+ ) : $Input:ty $(,)?) $($rest:tt)+
     ) => {
         $crate::__impl_from_and_into_var! {
             =output=>
@@ -196,7 +196,7 @@ macro_rules! __impl_from_and_into_var {
     (
         =input=>
         [$($config:tt)*]
-        ([ $($destructure:tt)+ ] : $Input:ty) $($rest:tt)+
+        ([ $($destructure:tt)+ ] : $Input:ty $(,)?) $($rest:tt)+
     ) => {
         $crate::__impl_from_and_into_var! {
             =output=>
diff --git a/crates/zng-view-api/src/lib.rs b/crates/zng-view-api/src/lib.rs
index 7c9117a1c..5f02b1212 100644
--- a/crates/zng-view-api/src/lib.rs
+++ b/crates/zng-view-api/src/lib.rs
@@ -402,12 +402,7 @@ declare_api! {
     /// Replace the image resource in the window renderer.
     ///
     /// The [`ImageTextureId`] will be associated with the new [`ImageId`].
-    pub fn update_image_use(
-        &mut self,
-        id: WindowId,
-        texture_id: ImageTextureId,
-        image_id: ImageId,
-    );
+    pub fn update_image_use(&mut self, id: WindowId, texture_id: ImageTextureId, image_id: ImageId);
 
     /// Delete the image resource in the window renderer.
     pub fn delete_image_use(&mut self, id: WindowId, texture_id: ImageTextureId);
@@ -540,13 +535,23 @@ declare_api! {
     ///
     /// This is similar to [`Api::app_extension`], but is targeting the instance of an extension associated
     /// with the `id` window or headless surface.
-    pub fn window_extension(&mut self, id: WindowId, extension_id: ApiExtensionId, extension_request: ApiExtensionPayload) -> ApiExtensionPayload;
+    pub fn window_extension(
+        &mut self,
+        id: WindowId,
+        extension_id: ApiExtensionId,
+        extension_request: ApiExtensionPayload,
+    ) -> ApiExtensionPayload;
 
     /// Call the API extension.
     ///
     /// This is similar to [`Api::app_extension`], but is targeting the instance of an extension associated
     /// with the `id` renderer.
-    pub fn render_extension(&mut self, id: WindowId, extension_id: ApiExtensionId, extension_request: ApiExtensionPayload) -> ApiExtensionPayload;
+    pub fn render_extension(
+        &mut self,
+        id: WindowId,
+        extension_id: ApiExtensionId,
+        extension_request: ApiExtensionPayload,
+    ) -> ApiExtensionPayload;
 }
 
 pub(crate) type AnyResult<T> = std::result::Result<T, Box<dyn std::error::Error>>;
diff --git a/crates/zng-view-api/src/window.rs b/crates/zng-view-api/src/window.rs
index 5576f89d6..fb73f8eff 100644
--- a/crates/zng-view-api/src/window.rs
+++ b/crates/zng-view-api/src/window.rs
@@ -22,7 +22,7 @@ crate::declare_id! {
     /// The App Process defines the ID.
     pub struct WindowId(_);
 
-        /// Monitor screen ID in channel.
+    /// Monitor screen ID in channel.
     ///
     /// In the View Process this is mapped to a system id.
     ///
diff --git a/crates/zng-wgt-ansi-text/src/lib.rs b/crates/zng-wgt-ansi-text/src/lib.rs
index 3cade0b8d..cf14ceef4 100644
--- a/crates/zng-wgt-ansi-text/src/lib.rs
+++ b/crates/zng-wgt-ansi-text/src/lib.rs
@@ -169,7 +169,7 @@ mod ansi_parse {
                 AnsiColor::Ansi256(c) => {
                     let (r, g, b) = X_TERM_256[c as usize];
                     rgb(r, g, b)
-                },
+                }
                 AnsiColor::TrueColor(r, g, b) => rgb(r, g, b),
             }
         }
@@ -399,32 +399,24 @@ mod ansi_fn {
         /// Widget function for [`TextFnArgs`].
         ///
         /// The returned widgets are layout by the [`LINE_FN_VAR`]. The default view is [`default_text_fn`].
-        pub static TEXT_FN_VAR: WidgetFn<TextFnArgs> = wgt_fn!(|args: TextFnArgs| {
-            default_text_fn(args)
-        });
+        pub static TEXT_FN_VAR: WidgetFn<TextFnArgs> = wgt_fn!(|args: TextFnArgs| { default_text_fn(args) });
 
         /// Widget function for [`LineFnArgs`].
         ///
         /// The returned widgets are layout by the [`PAGE_FN_VAR`]. The default view is [`default_line_fn`].
-        pub static LINE_FN_VAR: WidgetFn<LineFnArgs> = wgt_fn!(|args: LineFnArgs| {
-            default_line_fn(args)
-        });
+        pub static LINE_FN_VAR: WidgetFn<LineFnArgs> = wgt_fn!(|args: LineFnArgs| { default_line_fn(args) });
 
         /// Widget function for [`PageFnArgs`].
         ///
         /// The returned widgets are layout by the [`PANEL_FN_VAR`] widget. The default view is [`default_page_fn`].
-        pub static PAGE_FN_VAR: WidgetFn<PageFnArgs> = wgt_fn!(|args: PageFnArgs| {
-            default_page_fn(args)
-        });
+        pub static PAGE_FN_VAR: WidgetFn<PageFnArgs> = wgt_fn!(|args: PageFnArgs| { default_page_fn(args) });
 
         /// Widget function for [`PanelFnArgs`].
         ///
         /// The returned view is the [`AnsiText!`] child. The default is [`default_panel_fn`].
         ///
         /// [`AnsiText!`]: struct@super::AnsiText
-        pub static PANEL_FN_VAR: WidgetFn<PanelFnArgs> = wgt_fn!(|args: PanelFnArgs| {
-            default_panel_fn(args)
-        });
+        pub static PANEL_FN_VAR: WidgetFn<PanelFnArgs> = wgt_fn!(|args: PanelFnArgs| { default_panel_fn(args) });
 
         /// Duration the ANSI blink animation keeps the text visible for.
         ///
diff --git a/crates/zng-wgt-data/src/lib.rs b/crates/zng-wgt-data/src/lib.rs
index 4ac54fcbb..0f06bedf3 100644
--- a/crates/zng-wgt-data/src/lib.rs
+++ b/crates/zng-wgt-data/src/lib.rs
@@ -242,7 +242,10 @@ context_var! {
         // (dark, light)
         map.insert(DataNoteLevel::INFO, LightDark::new(colors::AZURE, colors::AZURE));
         map.insert(DataNoteLevel::WARN, LightDark::new(colors::ORANGE, colors::YELLOW));
-        map.insert(DataNoteLevel::ERROR, LightDark::new(colors::RED, colors::WHITE.with_alpha(20.pct()).mix_normal(colors::RED)));
+        map.insert(
+            DataNoteLevel::ERROR,
+            LightDark::new(colors::RED, colors::WHITE.with_alpha(20.pct()).mix_normal(colors::RED)),
+        );
         map
     };
 }
diff --git a/crates/zng-wgt-dialog/src/lib.rs b/crates/zng-wgt-dialog/src/lib.rs
index 0e22b77ba..758bbae7c 100644
--- a/crates/zng-wgt-dialog/src/lib.rs
+++ b/crates/zng-wgt-dialog/src/lib.rs
@@ -382,7 +382,6 @@ impl WarnStyle {
                 zng_wgt_text::font_color = colors::ORANGE;
                 padding = 5;
             };
-
         }
     }
 }
@@ -402,7 +401,6 @@ impl ErrorStyle {
                 zng_wgt_text::font_color = rgb(209, 29, 29);
                 padding = 5;
             };
-
         }
     }
 }
diff --git a/crates/zng-wgt-inspector/src/live/inspector_window.rs b/crates/zng-wgt-inspector/src/live/inspector_window.rs
index bafbbf9c5..ef387a6ee 100644
--- a/crates/zng-wgt-inspector/src/live/inspector_window.rs
+++ b/crates/zng-wgt-inspector/src/live/inspector_window.rs
@@ -441,13 +441,16 @@ fn selected_view(wgt: Option<InspectedWidget>) -> impl UiNode {
                             },
                         ]
                     },
-                    presenter(wgt.inspector_info(), wgt_fn!(|i| {
-                        if let Some(i) = i {
-                            inspector_info_view(i).boxed()
-                        } else {
-                            NilUiNode.boxed()
-                        }
-                    })),
+                    presenter(
+                        wgt.inspector_info(),
+                        wgt_fn!(|i| {
+                            if let Some(i) = i {
+                                inspector_info_view(i).boxed()
+                            } else {
+                                NilUiNode.boxed()
+                            }
+                        })
+                    ),
                     Hr!(),
                     info_watchers(&wgt),
                 ]
@@ -550,11 +553,7 @@ fn property_view(
         Text! {
             txt = info.name;
             font_color = PROPERTY_COLOR_VAR;
-            tooltip = Tip!(Text!(if captured {
-                "captured property"
-            } else {
-                "property"
-            }));
+            tooltip = Tip!(Text!(if captured { "captured property" } else { "property" }));
         },
         Text!(" = "),
     ];
@@ -566,11 +565,7 @@ fn property_view(
             txt = value;
             font_color = PROPERTY_VALUE_COLOR_VAR;
             background_color = flash;
-            tooltip = Tip!(Text!(if user_assigned {
-                "instance value"
-            } else {
-                "intrinsic value"
-            }))
+            tooltip = Tip!(Text!(if user_assigned { "instance value" } else { "intrinsic value" }))
         });
         children.push(Text!(";"));
     } else {
diff --git a/crates/zng-wgt-layer/src/lib.rs b/crates/zng-wgt-layer/src/lib.rs
index 3db9172f0..fb59ed39f 100644
--- a/crates/zng-wgt-layer/src/lib.rs
+++ b/crates/zng-wgt-layer/src/lib.rs
@@ -1111,8 +1111,8 @@ impl AnchorOffset {
     }
 }
 impl_from_and_into_var! {
-     /// `(place, origin)`.
-     fn from<P: Into<Point>, O: Into<Point>>(place_origin: (P, O)) -> AnchorOffset {
+    /// `(place, origin)`.
+    fn from<P: Into<Point>, O: Into<Point>>(place_origin: (P, O)) -> AnchorOffset {
         AnchorOffset {
             place: place_origin.0.into(),
             origin: place_origin.1.into(),
diff --git a/crates/zng-wgt-layer/src/popup.rs b/crates/zng-wgt-layer/src/popup.rs
index a79d3df27..f5871bdd8 100644
--- a/crates/zng-wgt-layer/src/popup.rs
+++ b/crates/zng-wgt-layer/src/popup.rs
@@ -377,14 +377,22 @@ impl Default for ContextCapture {
 impl_from_and_into_var! {
     fn from(capture_vars_blend_over: bool) -> ContextCapture {
         if capture_vars_blend_over {
-            ContextCapture::CaptureBlend { filter: CaptureFilter::ContextVars { exclude: ContextValueSet::new() }, over: true }
+            ContextCapture::CaptureBlend {
+                filter: CaptureFilter::ContextVars {
+                    exclude: ContextValueSet::new(),
+                },
+                over: true,
+            }
         } else {
             ContextCapture::NoCapture
         }
     }
 
     fn from(filter_over: CaptureFilter) -> ContextCapture {
-        ContextCapture::CaptureBlend { filter: filter_over, over: true }
+        ContextCapture::CaptureBlend {
+            filter: filter_over,
+            over: true,
+        }
     }
 }
 
diff --git a/crates/zng-wgt-markdown/src/view_fn.rs b/crates/zng-wgt-markdown/src/view_fn.rs
index d1d384d73..d5df636a4 100644
--- a/crates/zng-wgt-markdown/src/view_fn.rs
+++ b/crates/zng-wgt-markdown/src/view_fn.rs
@@ -553,7 +553,7 @@ pub fn default_heading_fn(args: HeadingFnArgs) -> impl UiNode {
                 HeadingLevel::H3 => 1.4.em(),
                 HeadingLevel::H4 => 1.3.em(),
                 HeadingLevel::H5 => 1.2.em(),
-                HeadingLevel::H6 => 1.1.em()
+                HeadingLevel::H6 => 1.1.em(),
             };
             children = args.items;
             anchor = args.anchor;
@@ -581,7 +581,9 @@ pub fn default_list_fn(args: ListFnArgs) -> impl UiNode {
             cells = args.items;
             columns = ui_vec![
                 grid::Column!(),
-                grid::Column! { width = 1.lft() },
+                grid::Column! {
+                    width = 1.lft()
+                },
             ];
         }
         .boxed()
@@ -710,9 +712,7 @@ pub fn default_image_fn(args: ImageFnArgs) -> impl UiNode {
             source = args.source;
             tooltip_fn;
             zng_wgt_access::label = alt_txt;
-            img_error_fn = wgt_fn!(|_| {
-                alt_items.take_on_init()
-            });
+            img_error_fn = wgt_fn!(|_| { alt_items.take_on_init() });
         }
     }
 }
diff --git a/crates/zng-wgt-menu/src/lib.rs b/crates/zng-wgt-menu/src/lib.rs
index e18cfff90..b0424bf28 100644
--- a/crates/zng-wgt-menu/src/lib.rs
+++ b/crates/zng-wgt-menu/src/lib.rs
@@ -180,10 +180,13 @@ impl TouchButtonStyle {
         widget_set! {
             self;
             zng_wgt::corner_radius = 0;
-            zng_wgt::visibility = BUTTON.cmd().flat_map(|c| match c {
-                Some(c) => c.is_enabled().boxed(),
-                None => LocalVar(true).boxed(),
-            }).map_into();
+            zng_wgt::visibility = BUTTON
+                .cmd()
+                .flat_map(|c| match c {
+                    Some(c) => c.is_enabled().boxed(),
+                    None => LocalVar(true).boxed(),
+                })
+                .map_into();
         }
     }
 }
@@ -205,7 +208,7 @@ impl ToggleStyle {
             click_mode = ClickMode::release();
             access_role = AccessRole::MenuItemCheckBox;
 
-            sub::start_column_fn = wgt_fn!(|_ | Text! {
+            sub::start_column_fn = wgt_fn!(|_| Text! {
                 size = 1.2.em();
                 font_family = FontNames::system_ui(&lang!(und));
                 align = Align::CENTER;
diff --git a/crates/zng-wgt-menu/src/sub.rs b/crates/zng-wgt-menu/src/sub.rs
index d236dac4d..a7bfff382 100644
--- a/crates/zng-wgt-menu/src/sub.rs
+++ b/crates/zng-wgt-menu/src/sub.rs
@@ -490,17 +490,25 @@ impl SubMenuStyle {
         widget_set! {
             self;
 
-            zng_wgt_layer::popup::anchor_mode = DIRECTION_VAR.map(|d| match d {
-                LayoutDirection::LTR => AnchorMode::popup(AnchorOffset { place: Point::top_right(), origin: Point::top_left() }),
-                LayoutDirection::RTL => AnchorMode::popup(AnchorOffset { place: Point::top_left(), origin: Point::top_right() }),
-            }.with_min_size(AnchorSize::Unbounded));
+            zng_wgt_layer::popup::anchor_mode = DIRECTION_VAR.map(|d| {
+                match d {
+                    LayoutDirection::LTR => AnchorMode::popup(AnchorOffset {
+                        place: Point::top_right(),
+                        origin: Point::top_left(),
+                    }),
+                    LayoutDirection::RTL => AnchorMode::popup(AnchorOffset {
+                        place: Point::top_left(),
+                        origin: Point::top_right(),
+                    }),
+                }
+                .with_min_size(AnchorSize::Unbounded)
+            });
 
             when *#is_open {
                 background_color = BASE_COLOR_VAR.shade(1);
                 opacity = 100.pct();
             }
 
-
             end_column_fn = wgt_fn!(|_| zng_wgt_text::Text! {
                 size = 1.2.em();
                 font_family = FontNames::system_ui(&lang!(und));
diff --git a/crates/zng-wgt-rule-line/src/lib.rs b/crates/zng-wgt-rule-line/src/lib.rs
index 877d0afd1..6639c38e2 100644
--- a/crates/zng-wgt-rule-line/src/lib.rs
+++ b/crates/zng-wgt-rule-line/src/lib.rs
@@ -230,7 +230,7 @@ pub mod vr {
         /// Line style, default is `Solid`.
         pub static LINE_STYLE_VAR: LineStyle = LineStyle::Solid;
 
-                /// Margin around line.
+        /// Margin around line.
         ///
         /// Is `(0, 4)` by default, 0 top-bottom, 4 left-right.
         pub static MARGIN_VAR: SideOffsets = (0, 4);
diff --git a/crates/zng-wgt-scroll/src/scroll_properties.rs b/crates/zng-wgt-scroll/src/scroll_properties.rs
index edcf676a2..c835806af 100644
--- a/crates/zng-wgt-scroll/src/scroll_properties.rs
+++ b/crates/zng-wgt-scroll/src/scroll_properties.rs
@@ -81,7 +81,7 @@ context_var! {
     ///
     /// Default is minimal 0dip on all sides.
     pub static SCROLL_TO_FOCUSED_MODE_VAR: Option<ScrollToMode> = ScrollToMode::Minimal {
-        margin: SideOffsets::new_all(0.dip())
+        margin: SideOffsets::new_all(0.dip()),
     };
 
     /// Extra space added to the viewport auto-hide rectangle.
@@ -134,9 +134,7 @@ context_var! {
     /// Is [`node::default_auto_scroll_indicator`] by default.
     ///
     /// [`node::default_auto_scroll_indicator`]: crate::node::default_auto_scroll_indicator
-    pub static AUTO_SCROLL_INDICATOR_VAR: WidgetFn<AutoScrollArgs> = wgt_fn!(|_| {
-        crate::node::default_auto_scroll_indicator()
-    });
+    pub static AUTO_SCROLL_INDICATOR_VAR: WidgetFn<AutoScrollArgs> = wgt_fn!(|_| { crate::node::default_auto_scroll_indicator() });
 }
 
 fn default_scrollbar() -> WidgetFn<ScrollBarArgs> {
diff --git a/crates/zng-wgt-scroll/src/types.rs b/crates/zng-wgt-scroll/src/types.rs
index d7ed1296e..540918d80 100644
--- a/crates/zng-wgt-scroll/src/types.rs
+++ b/crates/zng-wgt-scroll/src/types.rs
@@ -97,7 +97,6 @@ context_var! {
 
     /// Scroll mode.
     pub(super) static SCROLL_MODE_VAR: ScrollMode = ScrollMode::empty();
-
 }
 
 context_local! {
diff --git a/crates/zng-wgt-settings/src/lib.rs b/crates/zng-wgt-settings/src/lib.rs
index 979d9652c..f0ef2a389 100644
--- a/crates/zng-wgt-settings/src/lib.rs
+++ b/crates/zng-wgt-settings/src/lib.rs
@@ -343,7 +343,7 @@ pub fn handle_settings_cmd() {
                     }
 
                     Window! {
-                        title = l10n!("widow.title", "{$app} - Settings", app=zng_env::about().app.clone());
+                        title = l10n!("widow.title", "{$app} - Settings", app = zng_env::about().app.clone());
                         parent;
                         child = SettingsEditor! {
                             id = "zng-config-settings-default-editor";
diff --git a/crates/zng-wgt-text-input/src/selectable.rs b/crates/zng-wgt-text-input/src/selectable.rs
index 0d50a3c89..a462a9320 100644
--- a/crates/zng-wgt-text-input/src/selectable.rs
+++ b/crates/zng-wgt-text-input/src/selectable.rs
@@ -80,10 +80,7 @@ pub fn default_selection_toolbar(args: text::SelectionToolbarArgs) -> impl UiNod
         let id = args.anchor_id;
         ContextMenu! {
             style_fn = menu::context::TouchStyle!();
-            children = ui_vec![
-                Button!(COPY_CMD.scoped(id)),
-                Button!(text::cmd::SELECT_ALL_CMD.scoped(id)),
-            ]
+            children = ui_vec![Button!(COPY_CMD.scoped(id)), Button!(text::cmd::SELECT_ALL_CMD.scoped(id)),]
         }
         .boxed()
     } else {
diff --git a/crates/zng/src/third_party.rs b/crates/zng/src/third_party.rs
index 7236bfd3f..a6733ae39 100644
--- a/crates/zng/src/third_party.rs
+++ b/crates/zng/src/third_party.rs
@@ -163,7 +163,7 @@ pub(crate) fn setup_default_view() {
                     }
 
                     Window! {
-                        title = l10n!("window.title", "{$app} - Third Party Licenses", app=zng::env::about().app.clone());
+                        title = l10n!("window.title", "{$app} - Third Party Licenses", app = zng::env::about().app.clone());
                         child = default_view();
                         parent;
                     }
diff --git a/examples/animation/src/main.rs b/examples/animation/src/main.rs
index e5552c833..5703cafed 100644
--- a/examples/animation/src/main.rs
+++ b/examples/animation/src/main.rs
@@ -74,9 +74,11 @@ fn example() -> impl UiNode {
                 spacing = 2;
                 toggle::selector = toggle::Selector::single(easing_mod.clone());
                 children = {
-                    let mode = |m: Txt| Toggle! {
-                        child = Text!(m.clone());
-                        value::<Txt> = m;
+                    let mode = |m: Txt| {
+                        Toggle! {
+                            child = Text!(m.clone());
+                            value::<Txt> = m;
+                        }
                     };
                     ui_vec![
                         mode(Txt::from("ease_in")),
@@ -93,7 +95,9 @@ fn example() -> impl UiNode {
                 spacing = 2;
                 columns = ui_vec![grid::Column!(1.lft()); 7];
                 auto_grow_fn = wgt_fn!(|_| grid::Row!(1.lft()));
-                button::style_fn = Style! { layout::padding = 3 };
+                button::style_fn = Style! {
+                    layout::padding = 3
+                };
                 cells = ui_vec![
                     ease_btn(&x, &color, "", EasingFn::Linear, &easing_mod),
                     ease_btn(&x, &color, "", EasingFn::Quad, &easing_mod),
@@ -106,8 +110,20 @@ fn example() -> impl UiNode {
                     ease_btn(&x, &color, "", EasingFn::Back, &easing_mod),
                     ease_btn(&x, &color, "", EasingFn::Elastic, &easing_mod),
                     ease_btn(&x, &color, "", EasingFn::Bounce, &easing_mod),
-                    ease_btn(&x, &color, "step_ceil(6)", EasingFn::custom(|t| easing::step_ceil(6, t)), &easing_mod),
-                    ease_btn(&x, &color, "step_floor(6)", EasingFn::custom(|t| easing::step_floor(6, t)), &easing_mod),
+                    ease_btn(
+                        &x,
+                        &color,
+                        "step_ceil(6)",
+                        EasingFn::custom(|t| easing::step_ceil(6, t)),
+                        &easing_mod
+                    ),
+                    ease_btn(
+                        &x,
+                        &color,
+                        "step_floor(6)",
+                        EasingFn::custom(|t| easing::step_floor(6, t)),
+                        &easing_mod
+                    ),
                     ease_btn(&x, &color, "", EasingFn::None, &easing_mod),
                 ]
             },
diff --git a/examples/button/src/main.rs b/examples/button/src/main.rs
index 490977c65..4d3ed894b 100644
--- a/examples/button/src/main.rs
+++ b/examples/button/src/main.rs
@@ -39,9 +39,7 @@ fn main() {
                             light_button(),
                         ];
                     },
-
                     toggle_buttons(),
-
                     dyn_buttons(),
                     dyn_buttons_from_data(),
                 ]
@@ -57,7 +55,7 @@ fn example() -> impl UiNode {
     Button! {
         on_click = hn!(t, |_| {
             count += 1;
-            let new_txt = formatx!("Clicked {count} time{}!", if count > 1 {"s"} else {""});
+            let new_txt = formatx!("Clicked {count} time{}!", if count > 1 { "s" } else { "" });
             t.set(new_txt);
         });
         gesture::on_double_click = hn!(|_| tracing::info!("double click!"));
@@ -237,7 +235,6 @@ fn combo_box() -> impl UiNode {
     let txt = var(Txt::from_static("Combo"));
     let options = ["Combo", "Congo", "Pombo"];
     Toggle! {
-
         id = "combo";
         child = TextInput! {
             txt = txt.clone();
@@ -250,11 +247,15 @@ fn combo_box() -> impl UiNode {
             child = Stack! {
                 toggle::selector = toggle::Selector::single(txt.clone());
                 direction = StackDirection::top_to_bottom();
-                children = options.into_iter().map(|o| Toggle! {
-                    child = Text!(o);
-                    value::<Txt> = o;
-                })
-                .collect::<UiNodeVec>();
+                children = options
+                    .into_iter()
+                    .map(|o| {
+                        Toggle! {
+                            child = Text!(o);
+                            value::<Txt> = o;
+                        }
+                    })
+                    .collect::<UiNodeVec>();
             };
         })
     }
@@ -275,9 +276,12 @@ fn dyn_buttons() -> impl UiNode {
                 child = Text!("Add Button");
                 tooltip = Tip!(Text!("Add `Button!` directly"));
                 on_click = hn!(|_| {
-                    children_ref.push(dyn_button(btn, clmv!(children_ref, || {
-                        children_ref.remove(WIDGET.id());
-                    })));
+                    children_ref.push(dyn_button(
+                        btn,
+                        clmv!(children_ref, || {
+                            children_ref.remove(WIDGET.id());
+                        }),
+                    ));
 
                     if btn == 'Z' {
                         btn = 'A'
diff --git a/examples/calculator/src/main.rs b/examples/calculator/src/main.rs
index c1feb83a0..aa34fccab 100644
--- a/examples/calculator/src/main.rs
+++ b/examples/calculator/src/main.rs
@@ -47,25 +47,28 @@ fn controls() -> impl UiNode {
     let b_back = btn_backspace();
     let b_equal = btn_eval();
 
+    #[rustfmt::skip]
+    let buttons = ui_vec![
+        b_squre, b_sroot, b_clear, b_back,
+        bn('7'), bn('8'), bn('9'), bn('/'),
+        bn('4'), bn('5'), bn('6'), bn('*'),
+        bn('1'), bn('2'), bn('3'), bn('-'),
+        bn('0'), bn('.'), b_equal, bn('+'),
+    ];
+
     Grid! {
         spacing = 2;
         columns = ui_vec![grid::Column!(1.lft()); 4];
         auto_grow_fn = wgt_fn!(|_| grid::Row!(1.lft()));
         text::font_size = 14.pt();
-        cells = ui_vec![
-            b_squre, b_sroot, b_clear, b_back,
-            bn('7'), bn('8'), bn('9'), bn('/'),
-            bn('4'), bn('5'), bn('6'), bn('*'),
-            bn('1'), bn('2'), bn('3'), bn('-'),
-            bn('0'), bn('.'), b_equal, bn('+'),
-        ];
+        cells = buttons;
     }
 }
 
 fn btn_square() -> impl UiNode {
     Button! {
         grid::cell::at = grid::cell::AT_AUTO;
-        on_click = hn!(|_| DATA.req::<Calculator>().modify(| c|c.to_mut().square()).unwrap());
+        on_click = hn!(|_| DATA.req::<Calculator>().modify(|c| c.to_mut().square()).unwrap());
         child = Text!("x²");
     }
 }
@@ -73,7 +76,7 @@ fn btn_square() -> impl UiNode {
 fn btn_square_root() -> impl UiNode {
     Button! {
         grid::cell::at = grid::cell::AT_AUTO;
-        on_click = hn!(|_| DATA.req::<Calculator>().modify(| c|c.to_mut().square_root()).unwrap());
+        on_click = hn!(|_| DATA.req::<Calculator>().modify(|c| c.to_mut().square_root()).unwrap());
         child = Text!("√x");
     }
 }
@@ -81,7 +84,7 @@ fn btn_square_root() -> impl UiNode {
 fn btn_clear() -> impl UiNode {
     Button! {
         grid::cell::at = grid::cell::AT_AUTO;
-        on_click = hn!(|_| DATA.req::<Calculator>().modify(| c|c.to_mut().clear()).unwrap());
+        on_click = hn!(|_| DATA.req::<Calculator>().modify(|c| c.to_mut().clear()).unwrap());
         click_shortcut = shortcut!(Escape);
         child = Text!("C");
     }
@@ -90,7 +93,7 @@ fn btn_clear() -> impl UiNode {
 fn btn_backspace() -> impl UiNode {
     Button! {
         grid::cell::at = grid::cell::AT_AUTO;
-        on_click = hn!(|_| DATA.req::<Calculator>().modify(|c|c.to_mut().backspace()).unwrap());
+        on_click = hn!(|_| DATA.req::<Calculator>().modify(|c| c.to_mut().backspace()).unwrap());
         click_shortcut = shortcut!(Backspace);
         child = Text!("⌫");
     }
@@ -114,7 +117,7 @@ fn btn(c: char) -> impl UiNode {
 fn btn_eval() -> impl UiNode {
     Button! {
         grid::cell::at = grid::cell::AT_AUTO;
-        on_click = hn!(|_| DATA.req::<Calculator>().modify(|c|c.to_mut().eval()).unwrap());
+        on_click = hn!(|_| DATA.req::<Calculator>().modify(|c| c.to_mut().eval()).unwrap());
         click_shortcut = vec![shortcut!(Enter), shortcut!('=')];
         child = Text!("=");
     }
diff --git a/examples/countdown/src/main.rs b/examples/countdown/src/main.rs
index 380e59471..c21126379 100644
--- a/examples/countdown/src/main.rs
+++ b/examples/countdown/src/main.rs
@@ -48,18 +48,20 @@ fn app_main() {
                 r
             }));
 
-            icon = WindowIcon::render(move || Container! {
-                image::render_retain = true;
+            icon = WindowIcon::render(move || {
+                Container! {
+                    image::render_retain = true;
 
-                layout::size = (36, 36);
-                widget::corner_radius = 8;
-                text::font_size = 28;
-                text::font_weight = FontWeight::BOLD;
-                child_align = Align::CENTER;
+                    layout::size = (36, 36);
+                    widget::corner_radius = 8;
+                    text::font_size = 28;
+                    text::font_weight = FontWeight::BOLD;
+                    child_align = Align::CENTER;
 
-                background_color = bkg.clone();
+                    background_color = bkg.clone();
 
-                child = Text!(count.map(|&n| if n > 0 { formatx!("{n}") } else { "C".to_txt() }));
+                    child = Text!(count.map(|&n| if n > 0 { formatx!("{n}") } else { "C".to_txt() }));
+                }
             });
         }
     })
diff --git a/examples/cursor/src/main.rs b/examples/cursor/src/main.rs
index c976ec5cc..77e1c9cee 100644
--- a/examples/cursor/src/main.rs
+++ b/examples/cursor/src/main.rs
@@ -22,14 +22,17 @@ fn main() {
             enabled_buttons = !window::WindowButton::MAXIMIZE;
             auto_size = true;
             padding = 20;
-            child = Stack!(top_to_bottom, ui_vec![
-                Grid! {
-                    columns = ui_vec![grid::Column!(1.lft()); 5];
-                    auto_grow_fn = wgt_fn!(|_| grid::Row!(1.lft()));
-                    cells = demos;
-                },
-                cursor_demo(None),
-            ])
+            child = Stack!(
+                top_to_bottom,
+                ui_vec![
+                    Grid! {
+                        columns = ui_vec![grid::Column!(1.lft()); 5];
+                        auto_grow_fn = wgt_fn!(|_| grid::Row!(1.lft()));
+                        cells = demos;
+                    },
+                    cursor_demo(None),
+                ]
+            )
         }
     })
 }
@@ -38,15 +41,16 @@ fn cursor_demo(icon: Option<(CursorIcon, &'static [u8])>) -> impl UiNode {
     widgets::DemoEntry! {
         mouse::cursor = match icon {
             Some(i) => i.0.into(),
-            None => mouse::CursorSource::Hidden
+            None => mouse::CursorSource::Hidden,
         };
 
         widget::background = match icon {
-            Some((_, img)) => Image!{
+            Some((_, img)) => Image! {
                 source = img;
                 img_fit = ImageFit::None;
                 invert_color = color::COLOR_SCHEME_VAR.map(|c| (*c == color::ColorScheme::Dark).into());
-            }.boxed(),
+            }
+            .boxed(),
             None => NilUiNode.boxed(),
         };
 
diff --git a/examples/focus/src/main.rs b/examples/focus/src/main.rs
index 602ef4826..bf0c48958 100644
--- a/examples/focus/src/main.rs
+++ b/examples/focus/src/main.rs
@@ -39,11 +39,7 @@ fn main() {
                         margin = (50, 0, 0, 0);
                         align = Align::CENTER;
                         spacing = 10;
-                        children = ui_vec![
-                            tab_index_example(),
-                            functions(window_enabled),
-                            delayed_focus(),
-                        ]
+                        children = ui_vec![tab_index_example(), functions(window_enabled), delayed_focus()]
                     }
                 ];
             };
@@ -64,10 +60,7 @@ fn alt_scope() -> impl UiNode {
             border = unset!;
             corner_radius = unset!;
         };
-        children = ui_vec![
-            button("alt", TabIndex::AUTO),
-            button("scope", TabIndex::AUTO),
-        ];
+        children = ui_vec![button("alt", TabIndex::AUTO), button("scope", TabIndex::AUTO),];
     }
 }
 
@@ -213,10 +206,11 @@ fn delayed_focus() -> impl UiNode {
         focus_shortcut = shortcut!('D');
         children = ui_vec![
             title("Delayed 4s (D)"),
-
             delayed_btn("Force Focus", || {
                 FOCUS.focus(FocusRequest {
-                    target: FocusTarget::Direct { target: WidgetId::named("target") },
+                    target: FocusTarget::Direct {
+                        target: WidgetId::named("target"),
+                    },
                     highlight: true,
                     force_window_focus: true,
                     window_indicator: None,
@@ -224,7 +218,9 @@ fn delayed_focus() -> impl UiNode {
             }),
             delayed_btn("Info Indicator", || {
                 FOCUS.focus(FocusRequest {
-                    target: FocusTarget::Direct { target: WidgetId::named("target") },
+                    target: FocusTarget::Direct {
+                        target: WidgetId::named("target"),
+                    },
                     highlight: true,
                     force_window_focus: false,
                     window_indicator: Some(FocusIndicator::Info),
@@ -232,13 +228,14 @@ fn delayed_focus() -> impl UiNode {
             }),
             delayed_btn("Critical Indicator", || {
                 FOCUS.focus(FocusRequest {
-                    target: FocusTarget::Direct { target: WidgetId::named("target") },
+                    target: FocusTarget::Direct {
+                        target: WidgetId::named("target"),
+                    },
                     highlight: true,
                     force_window_focus: false,
                     window_indicator: Some(FocusIndicator::Critical),
                 });
             }),
-
             Text! {
                 id = "target";
                 padding = (7, 15);
@@ -277,7 +274,11 @@ fn delayed_btn(content: impl Into<Txt>, on_timeout: impl FnMut() + Send + 'stati
 }
 
 fn title(txt: impl IntoVar<Txt>) -> impl UiNode {
-    Text! { txt; font_weight = FontWeight::BOLD; align = Align::CENTER; }
+    Text! {
+        txt;
+        font_weight = FontWeight::BOLD;
+        align = Align::CENTER;
+    }
 }
 
 fn button(content: impl Into<Txt>, tab_index: impl Into<TabIndex>) -> impl UiNode {
@@ -286,9 +287,7 @@ fn button(content: impl Into<Txt>, tab_index: impl Into<TabIndex>) -> impl UiNod
     Button! {
         child = Text!(content.clone());
         tab_index;
-        on_click = hn!(|_| {
-            tracing::info!("Clicked {content} {tab_index:?}")
-        });
+        on_click = hn!(|_| tracing::info!("Clicked {content} {tab_index:?}"));
     }
 }
 
@@ -317,15 +316,19 @@ fn commands() -> impl UiNode {
         text::font_family = FontName::monospace();
         font_color = colors::GRAY;
 
-        children = cmds.into_iter().map(|cmd| {
-            Text! {
-                txt = cmd.name_with_shortcut();
+        children = cmds
+            .into_iter()
+            .map(|cmd| {
+                Text! {
+                    txt = cmd.name_with_shortcut();
 
-                when *#{cmd.is_enabled()} {
-                    font_color = light_dark(colors::BLACK, colors::WHITE);
+                    when *#{cmd.is_enabled()} {
+                        font_color = light_dark(colors::BLACK, colors::WHITE);
+                    }
                 }
-            }.boxed()
-        }).collect::<Vec<_>>();
+                .boxed()
+            })
+            .collect::<Vec<_>>();
     }
 }
 
@@ -363,10 +366,7 @@ fn nested_focusables() -> impl UiNode {
                     child = Stack! {
                         direction = StackDirection::top_to_bottom();
                         spacing = 10;
-                        children = ui_vec![
-                            nested_focusables_group('a'),
-                            nested_focusables_group('b'),
-                        ];
+                        children = ui_vec![nested_focusables_group('a'), nested_focusables_group('b')];
                     }
                 }
             });
diff --git a/examples/headless/src/video.rs b/examples/headless/src/video.rs
index 53b10ccef..119da6773 100644
--- a/examples/headless/src/video.rs
+++ b/examples/headless/src/video.rs
@@ -63,20 +63,20 @@ pub fn run() {
                 task::spawn_wait(clmv!(encoded, || {
                     // https://www.ffmpeg.org/download.html
                     let ffmpeg = std::process::Command::new("ffmpeg")
-                    .arg("-framerate")
-                    .arg(FPS.to_string())
-                    .arg("-y")
-                    .arg("-i")
-                    .arg(temp.join("%05d.png"))
-                    .arg("-c:v")
-                    .arg("libx264")
-                    .arg("-pix_fmt")
-                    .arg("yuv420p")
-                    .arg("screencast.mp4")
-                    .arg("-hide_banner")
-                    .arg("-loglevel")
-                    .arg("error")
-                    .status();
+                        .arg("-framerate")
+                        .arg(FPS.to_string())
+                        .arg("-y")
+                        .arg("-i")
+                        .arg(temp.join("%05d.png"))
+                        .arg("-c:v")
+                        .arg("libx264")
+                        .arg("-pix_fmt")
+                        .arg("yuv420p")
+                        .arg("screencast.mp4")
+                        .arg("-hide_banner")
+                        .arg("-loglevel")
+                        .arg("error")
+                        .status();
                     let _ = std::fs::remove_dir_all(temp);
                     encoded.set(true);
 
@@ -128,10 +128,7 @@ fn video(finished: zng::var::ArcVar<bool>) -> impl UiNode {
                     color.alpha = 0.3;
                     let stops = color::gradient::GradientStops::from_stripes(&[color, color.transparent()], 0.0);
                     let angle = angle.deg();
-                    color::gradient::linear_gradient(
-                        bkg_rotate.map(move |r| (angle + layout::AngleDegree::from(*r)).into()),
-                        stops
-                    )
+                    color::gradient::linear_gradient(bkg_rotate.map(move |r| (angle + layout::AngleDegree::from(*r)).into()), stops)
                 });
 
                 ui_vec![
diff --git a/examples/hot-reload/src/main.rs b/examples/hot-reload/src/main.rs
index 4e9835b43..9d544311d 100644
--- a/examples/hot-reload/src/main.rs
+++ b/examples/hot-reload/src/main.rs
@@ -24,7 +24,9 @@ fn main() {
 
             // hot reloading property, the state does not change, but changes in the property code update.
             hot_reload_lib::hot_prop = state.clone();
-            gesture::on_click = hn!(|_| { state.set(!state.get()); });
+            gesture::on_click = hn!(|_| {
+                state.set(!state.get());
+            });
         };
 
         Window! {
@@ -33,11 +35,10 @@ fn main() {
 
             child = example;
 
-             // layout affects the hot node correctly.
+            // layout affects the hot node correctly.
             child_align = Align::CENTER;
             // context values propagate to the hot node correctly.
             text::font_size = 2.em();
-
         }
     })
 }
diff --git a/examples/icon/src/main.rs b/examples/icon/src/main.rs
index c33e37f7a..a10a796ae 100644
--- a/examples/icon/src/main.rs
+++ b/examples/icon/src/main.rs
@@ -25,10 +25,12 @@ fn main() {
     APP.defaults().run_window(async {
         Window! {
             title = "Icon Example";
-            icon = WindowIcon::render(|| Icon! {
-                ico = icon::material::filled::req("lightbulb");
-                ico_color = colors::YELLOW;
-                drop_shadow = (0, 0), 3, colors::WHITE;
+            icon = WindowIcon::render(|| {
+                Icon! {
+                    ico = icon::material::filled::req("lightbulb");
+                    ico_color = colors::YELLOW;
+                    drop_shadow = (0, 0), 3, colors::WHITE;
+                }
             });
             child = Scroll! {
                 mode = ScrollMode::VERTICAL;
@@ -104,7 +106,7 @@ fn icons() -> impl UiNode {
             TextInput! {
                 id = "search";
                 txt = search.clone();
-                focus_shortcut = [shortcut!['S'], shortcut![CTRL+'F'], shortcut![Find]];
+                focus_shortcut = [shortcut!['S'], shortcut![CTRL + 'F'], shortcut![Find]];
                 placeholder_txt = "search icons (S)";
                 style_fn = zng::text_input::SearchStyle!();
                 layout::min_width = 40.vh_pct();
diff --git a/examples/image/src/main.rs b/examples/image/src/main.rs
index e7a609124..f4f917b7e 100644
--- a/examples/image/src/main.rs
+++ b/examples/image/src/main.rs
@@ -158,12 +158,16 @@ fn main() {
                             img_filter(Filter::new_opacity(50.pct())),
                             img_filter(Filter::new_invert(true)),
                             img_filter(Filter::new_hue_rotate(-(90.deg()))),
-                            img_filter(Filter::new_color_matrix([
-                                2.0, 1.0, 1.0, 1.0, 0.0,
-                                0.0, 1.0, 0.0, 0.0, 0.0,
-                                0.0, 0.0, 1.0, 0.0, 0.0,
-                                0.0, 0.0, 0.0, 1.0, 0.0,
-                            ])),
+                            img_filter({
+                                #[rustfmt::skip]
+                                let custom = Filter::new_color_matrix([
+                                    2.0, 1.0, 1.0, 1.0, 0.0,
+                                    0.0, 1.0, 0.0, 0.0, 0.0,
+                                    0.0, 0.0, 1.0, 0.0, 0.0,
+                                    0.0, 0.0, 0.0, 1.0, 0.0,
+                                ]);
+                                custom
+                            }),
                         ]
                     ),
 
@@ -417,12 +421,12 @@ fn repeat_image() -> impl UiNode {
                         child = Image! {
                             img_fit = ImageFit::None;
                             img_repeat = true;
-                            img_repeat_spacing = show_pattern.map(|&s| layout::Size::from(if s { 10 } else { 0 })).easing(300.ms(), easing::linear);
+                            img_repeat_spacing = show_pattern
+                                .map(|&s| layout::Size::from(if s { 10 } else { 0 }))
+                                .easing(300.ms(), easing::linear);
                             size = (10000, 100.pct());
                             source = "https://upload.wikimedia.org/wikipedia/commons/9/91/Turtle_seamless_pattern.jpg";
-                            mouse::on_mouse_input = hn!(
-                                show_pattern,
-                                |args: &mouse::MouseInputArgs| {
+                            mouse::on_mouse_input = hn!(show_pattern, |args: &mouse::MouseInputArgs| {
                                 show_pattern.set(matches!(args.state, mouse::ButtonState::Pressed));
                             });
                             on_error = hn!(|args: &ImgErrorArgs| {
@@ -547,7 +551,8 @@ fn center_viewport(msg: impl UiNode) -> impl UiNode {
         // the large images can take a moment to decode in debug builds, but the size
         // is already known after read, so the "loading.." message ends-up off-screen
         // because it is centered on the image.
-        layout::x = merge_var!(SCROLL.horizontal_offset(), SCROLL.zoom_scale(), |&h, &s| h.0.fct_l() - 1.vw() / s * h);
+        layout::x = merge_var!(SCROLL.horizontal_offset(), SCROLL.zoom_scale(), |&h, &s| h.0.fct_l()
+            - 1.vw() / s * h);
         layout::y = merge_var!(SCROLL.vertical_offset(), SCROLL.zoom_scale(), |&v, &s| v.0.fct_l() - 1.vh() / s * v);
         layout::scale = SCROLL.zoom_scale().map(|&fct| 1.fct() / fct);
         layout::transform_origin = 0;
@@ -579,9 +584,8 @@ impl ImgWindow {
 
             child_align = Align::CENTER;
 
-
             state = WindowState::Maximized;
-            size = (1140, 770);// restore size
+            size = (1140, 770); // restore size
 
             icon = zng::env::res("zng-logo.png");
             widget::background = Checkerboard!();
diff --git a/examples/layer/src/main.rs b/examples/layer/src/main.rs
index a5f035883..89f9051ef 100644
--- a/examples/layer/src/main.rs
+++ b/examples/layer/src/main.rs
@@ -127,23 +127,26 @@ fn layer_n_btn(n: u32, color: color::Rgba) -> impl UiNode {
         child = Text!(label.clone());
         on_click = async_hn!(label, |_| {
             let id = WidgetId::new_unique();
-            LAYERS.insert(n, Container! {
-                id;
-                child = Text! {
-                    txt = label.clone();
-                    font_color = rgb(0.92, 0.92, 0.92);
-                    font_size = 16;
-                    font_weight = FontWeight::BOLD;
-                };
-                background_color = color.with_alpha(80.pct());
-                padding = 10;
-                margin = {
-                    let inc = n as i32 * 10;
-                    (20 + inc, 10, 0, inc - 40)
-                };
-                align = Align::TOP;
-                hit_test_mode = HitTestMode::Disabled;
-            });
+            LAYERS.insert(
+                n,
+                Container! {
+                    id;
+                    child = Text! {
+                        txt = label.clone();
+                        font_color = rgb(0.92, 0.92, 0.92);
+                        font_size = 16;
+                        font_weight = FontWeight::BOLD;
+                    };
+                    background_color = color.with_alpha(80.pct());
+                    padding = 10;
+                    margin = {
+                        let inc = n as i32 * 10;
+                        (20 + inc, 10, 0, inc - 40)
+                    };
+                    align = Align::TOP;
+                    hit_test_mode = HitTestMode::Disabled;
+                },
+            );
 
             task::deadline(2.secs()).await;
 
@@ -190,17 +193,22 @@ fn anchor_example() -> impl UiNode {
         align = Align::CENTER;
 
         mouse::on_mouse_enter = hn!(|_| {
-            LAYERS.insert_anchored(LayerIndex::ADORNER, "anchor", anchor_mode.clone(), Text! {
-                id = "anchored";
-                txt = "Example";
-                font_color = rgb(0.92, 0.92, 0.92);
-                layout::padding = 4;
-                font_weight = FontWeight::BOLD;
-                background_color = web_colors::DARK_GREEN.with_alpha(80.pct());
-                border = 1, web_colors::GREEN.darken(20.pct());
-                margin = 2;
-                hit_test_mode = HitTestMode::Disabled;
-            })
+            LAYERS.insert_anchored(
+                LayerIndex::ADORNER,
+                "anchor",
+                anchor_mode.clone(),
+                Text! {
+                    id = "anchored";
+                    txt = "Example";
+                    font_color = rgb(0.92, 0.92, 0.92);
+                    layout::padding = 4;
+                    font_weight = FontWeight::BOLD;
+                    background_color = web_colors::DARK_GREEN.with_alpha(80.pct());
+                    border = 1, web_colors::GREEN.darken(20.pct());
+                    margin = 2;
+                    hit_test_mode = HitTestMode::Disabled;
+                },
+            )
         });
         mouse::on_mouse_leave = hn!(|_| {
             LAYERS.remove("anchored");
@@ -221,17 +229,22 @@ fn transform_anchor_example() -> impl UiNode {
 
         on_click = hn!(|_| {
             if insert {
-                LAYERS.insert_anchored(LayerIndex::ADORNER, "t-anchor", AnchorMode::foreground(), Container! {
-                    id = "t-anchored";
-                    child_align = Align::TOP_LEFT;
-                    border = 1, colors::GREEN.lighten(30.pct());
-                    hit_test_mode = HitTestMode::Disabled;
-                    child = Text! {
-                        layout::y = -(2.dip() + 100.pct());
-                        txt = "example";
-                        font_weight = FontWeight::BOLD;
-                    }
-                })
+                LAYERS.insert_anchored(
+                    LayerIndex::ADORNER,
+                    "t-anchor",
+                    AnchorMode::foreground(),
+                    Container! {
+                        id = "t-anchored";
+                        child_align = Align::TOP_LEFT;
+                        border = 1, colors::GREEN.lighten(30.pct());
+                        hit_test_mode = HitTestMode::Disabled;
+                        child = Text! {
+                            layout::y = -(2.dip() + 100.pct());
+                            txt = "example";
+                            font_weight = FontWeight::BOLD;
+                        }
+                    },
+                )
             } else {
                 LAYERS.remove("t-anchored");
             }
diff --git a/examples/localize/src/main.rs b/examples/localize/src/main.rs
index 28532d951..ad400ff7b 100644
--- a/examples/localize/src/main.rs
+++ b/examples/localize/src/main.rs
@@ -106,7 +106,6 @@ fn window_content() -> impl UiNode {
             Text! {
                 txt = click_msg;
             },
-
             text::Text! {
                 layout::margin = (20, 0, 0, 0);
                 txt = l10n!("example-cmds", "Example Commands:");
@@ -171,13 +170,15 @@ fn locale_menu() -> impl UiNode {
                     spacing = 5;
                     layout::margin = 10;
                     toggle::selector = toggle::Selector::single_opt(selected);
-                    children = options.map(|(l, actual)| {
-                        Toggle! {
-                            text::font_style = if actual { FontStyle::Normal } else { FontStyle::Italic };
-                            child = Text!("{l}");
-                            value::<zng::l10n::Lang> = l.clone();
-                        }
-                    }).collect::<UiNodeVec>()
+                    children = options
+                        .map(|(l, actual)| {
+                            Toggle! {
+                                text::font_style = if actual { FontStyle::Normal } else { FontStyle::Italic };
+                                child = Text!("{l}");
+                                value::<zng::l10n::Lang> = l.clone();
+                            }
+                        })
+                        .collect::<UiNodeVec>()
                 }
             }),
         )
diff --git a/examples/respawn/src/main.rs b/examples/respawn/src/main.rs
index 8c488adfd..d6b246fd5 100644
--- a/examples/respawn/src/main.rs
+++ b/examples/respawn/src/main.rs
@@ -189,7 +189,7 @@ fn click_counter() -> impl UiNode {
     Button! {
         on_click = hn!(t, |_| {
             count += 1;
-            let new_txt = formatx!("Clicked {count} time{}!", if count > 1 {"s"} else {""});
+            let new_txt = formatx!("Clicked {count} time{}!", if count > 1 { "s" } else { "" });
             t.set(new_txt);
         });
         child = Text!(t);
@@ -198,7 +198,8 @@ fn click_counter() -> impl UiNode {
 
 fn image() -> impl UiNode {
     Image! {
-        source = include_bytes!("../../window/res/icon-bytes.png"); size = (32, 32);
+        source = include_bytes!("../../window/res/icon-bytes.png");
+        size = (32, 32);
         tooltip = Tip!(Text!("Image reloads after respawn"));
     }
 }
diff --git a/examples/scroll/src/main.rs b/examples/scroll/src/main.rs
index f7c882c5b..d5ad865c3 100644
--- a/examples/scroll/src/main.rs
+++ b/examples/scroll/src/main.rs
@@ -131,8 +131,20 @@ fn scroll_to_btn(target: WidgetId, mode: ScrollToMode) -> impl UiNode {
     let scroll = WidgetId::named("scroll");
     let cmd = cmd::SCROLL_TO_CMD.scoped(scroll);
     Button! {
-        child = Text!("Scroll To {} {}", target, if let ScrollToMode::Minimal {..} = &mode { "(minimal)" } else { "(center)" });
-        cmd_param = cmd::ScrollToRequest { target: target.into(), mode: mode.clone(), zoom: None, };
+        child = Text!(
+            "Scroll To {} {}",
+            target,
+            if let ScrollToMode::Minimal { .. } = &mode {
+                "(minimal)"
+            } else {
+                "(center)"
+            }
+        );
+        cmd_param = cmd::ScrollToRequest {
+            target: target.into(),
+            mode: mode.clone(),
+            zoom: None,
+        };
         cmd;
     }
 }
@@ -143,7 +155,11 @@ fn scroll_to_zoom_btn(target: WidgetId, zoom: layout::FactorPercent) -> impl UiN
     let cmd = cmd::SCROLL_TO_CMD.scoped(scroll);
     Button! {
         child = Text!("Scroll To {} (minimal) at {}", target, zoom);
-        cmd_param = cmd::ScrollToRequest { target: target.into(), mode: ScrollToMode::minimal(10), zoom: Some(zoom.into()), };
+        cmd_param = cmd::ScrollToRequest {
+            target: target.into(),
+            mode: ScrollToMode::minimal(10),
+            zoom: Some(zoom.into()),
+        };
         cmd;
     }
 }
@@ -154,8 +170,20 @@ fn scroll_to_rect(target: layout::Rect, mode: ScrollToMode) -> impl UiNode {
     let scroll = WidgetId::named("scroll");
     let cmd = cmd::SCROLL_TO_CMD.scoped(scroll);
     Button! {
-        child = Text!("Scroll To {} {}", target, if let ScrollToMode::Minimal {..} = &mode { "(minimal)" } else { "(center)" });
-        cmd_param = cmd::ScrollToRequest { target: target.clone().into(), mode: mode.clone(), zoom: None, };
+        child = Text!(
+            "Scroll To {} {}",
+            target,
+            if let ScrollToMode::Minimal { .. } = &mode {
+                "(minimal)"
+            } else {
+                "(center)"
+            }
+        );
+        cmd_param = cmd::ScrollToRequest {
+            target: target.clone().into(),
+            mode: mode.clone(),
+            zoom: None,
+        };
         cmd;
     }
 }
diff --git a/examples/shortcut/src/main.rs b/examples/shortcut/src/main.rs
index 2d41a97b5..02b20d365 100644
--- a/examples/shortcut/src/main.rs
+++ b/examples/shortcut/src/main.rs
@@ -66,7 +66,7 @@ fn app_main() {
             child = Stack! {
                 direction = StackDirection::top_to_bottom();
                 children = ui_vec![
-                    Text!{
+                    Text! {
                         align = Align::CENTER;
                         font_size = 18.pt();
                         txt = "Press a shortcut:";
diff --git a/examples/text/src/editor.rs b/examples/text/src/editor.rs
index 482c3cc00..8e32d9a47 100644
--- a/examples/text/src/editor.rs
+++ b/examples/text/src/editor.rs
@@ -31,9 +31,7 @@ pub fn text_editor() -> impl UiNode {
                     is_open.set(false);
                 }
             } else {
-                WINDOWS.open_id(editor_id, async_clmv!(is_open, {
-                    text_editor_window(is_open)
-                }));
+                WINDOWS.open_id(editor_id, async_clmv!(is_open, { text_editor_window(is_open) }));
             }
         });
     }
diff --git a/examples/text/src/form.rs b/examples/text/src/form.rs
index 6f37be793..bfd3054c8 100644
--- a/examples/text/src/form.rs
+++ b/examples/text/src/form.rs
@@ -24,9 +24,7 @@ pub fn form_editor() -> impl UiNode {
                     is_open.set(false);
                 }
             } else {
-                WINDOWS.open_id(editor_id, async_clmv!(is_open, {
-                    form_editor_window(is_open)
-                }));
+                WINDOWS.open_id(editor_id, async_clmv!(is_open, { form_editor_window(is_open) }));
             }
         });
     }
diff --git a/examples/text/src/main.rs b/examples/text/src/main.rs
index 5d760af5b..324a1fc87 100644
--- a/examples/text/src/main.rs
+++ b/examples/text/src/main.rs
@@ -32,27 +32,17 @@ fn main() {
                         Stack! {
                             direction = StackDirection::top_to_bottom();
                             spacing = 20;
-                            children = ui_vec![
-                                basic(),
-                                defaults(),
-                            ];
+                            children = ui_vec![basic(), defaults()];
                         },
                         Stack! {
                             direction = StackDirection::top_to_bottom();
                             spacing = 20;
-                            children = ui_vec![
-                                line_height(),
-                                line_spacing(),
-                                word_spacing(),
-                                letter_spacing(),
-                            ];
+                            children = ui_vec![line_height(), line_spacing(), word_spacing(), letter_spacing()];
                         },
                         Stack! {
                             direction = StackDirection::top_to_bottom();
                             spacing = 20;
-                            children = ui_vec![
-                                decoration_lines(),
-                            ]
+                            children = ui_vec![decoration_lines()]
                         }
                     ];
                 },
@@ -67,10 +57,7 @@ fn main() {
                     margin = 20;
                     align = Align::BOTTOM_RIGHT;
                     children_align = Align::RIGHT;
-                    children = ui_vec![
-                        editor::text_editor(),
-                        form::form_editor(),
-                    ];
+                    children = ui_vec![editor::text_editor(), form::form_editor()];
                 },
             ])
         }
@@ -84,7 +71,9 @@ fn font_size_example(font_size: ArcVar<Length>) -> impl UiNode {
         });
     }
     Stack! {
-        button::style_fn = Style! { padding = (0, 5) };
+        button::style_fn = Style! {
+            padding = (0, 5)
+        };
         direction = StackDirection::left_to_right();
         spacing = 5;
         corner_radius = 4;
@@ -96,9 +85,7 @@ fn font_size_example(font_size: ArcVar<Length>) -> impl UiNode {
                 font_family = FontName::monospace();
                 font_weight = FontWeight::BOLD;
                 click_shortcut = [shortcut!('-')];
-                on_click = hn!(font_size, |_| {
-                    change_size(&font_size, -1.0)
-                });
+                on_click = hn!(font_size, |_| change_size(&font_size, -1.0));
             },
             Text! {
                 txt = font_size.map(|s| formatx!("{s}"));
@@ -108,9 +95,7 @@ fn font_size_example(font_size: ArcVar<Length>) -> impl UiNode {
                 font_family = FontName::monospace();
                 font_weight = FontWeight::BOLD;
                 click_shortcut = [shortcut!('+')];
-                on_click = hn!(font_size, |_| {
-                    change_size(&font_size, 1.0)
-                });
+                on_click = hn!(font_size, |_| change_size(&font_size, 1.0));
             },
         ]
     }
@@ -323,6 +308,7 @@ fn section(header: &'static str, items: impl UiNodeList) -> impl UiNode {
             txt = header;
             font_weight = FontWeight::BOLD;
             margin = (0, 4);
-        }].chain(items);
+        }]
+        .chain(items);
     }
 }
diff --git a/examples/transform/src/main.rs b/examples/transform/src/main.rs
index 765d06b18..06d48fdc1 100644
--- a/examples/transform/src/main.rs
+++ b/examples/transform/src/main.rs
@@ -32,11 +32,7 @@ fn main() {
                                 direction = StackDirection::top_to_bottom();
                                 children_align = Align::TOP_LEFT;
                                 spacing = 40;
-                                children = ui_vec![
-                                    transform_stack(),
-                                    transform_order(),
-                                    cube_example(),
-                                ]
+                                children = ui_vec![transform_stack(), transform_order(), cube_example()]
                             }
                         ]
                     },
@@ -297,49 +293,60 @@ fn cube_example() -> impl UiNode {
                     id = "cube";
                     transform_style = TransformStyle::Preserve3D;
 
-                    children = (1..=6u8).map(|i| Text! {
-                        txt = i.to_txt();
-                        // size = 200;
-                        font_size = 62;
-                        font_weight = FontWeight::BOLD;
-                        txt_align = Align::CENTER;
-                        background_color = hsla((360.0 * (7.0 / i as f32)).deg(), 0.5, 0.5, 0.7);
-                        border = 2, text::FONT_COLOR_VAR.map_into();
-
-                        transform = Transform::new_translate_z(100).then(match i {
-                            1 => Transform::new_rotate_y(0.deg()),
-                            2 => Transform::new_rotate_y(90.deg()),
-                            3 => Transform::new_rotate_y(180.deg()),
-                            4 => Transform::new_rotate_y(-90.deg()),
-                            5 => Transform::new_rotate_x(90.deg()),
-                            6 => Transform::new_rotate_x(-90.deg()),
-                            _ => unreachable!()
-                        });
-                    }.boxed())
-                    .collect::<UiNodeVec>();
-
-                    transform = show.map(|&i| match i {
-                        1 => Transform::new_rotate_y(0.deg()),
-                        2 => Transform::new_rotate_y(-90.deg()),
-                        3 => Transform::new_rotate_y(-180.deg()),
-                        4 => Transform::new_rotate_y(90.deg()),
-                        5 => Transform::new_rotate_x(-90.deg()),
-                        6 => Transform::new_rotate_x(90.deg()),
-                        _ => unreachable!(),
-                    }
-                    .translate_z(-100))
-                    .easing_with(1.secs(), easing::linear, slerp_sampler)
+                    children = (1..=6u8)
+                        .map(|i| {
+                            Text! {
+                                txt = i.to_txt();
+                                // size = 200;
+                                font_size = 62;
+                                font_weight = FontWeight::BOLD;
+                                txt_align = Align::CENTER;
+                                background_color = hsla((360.0 * (7.0 / i as f32)).deg(), 0.5, 0.5, 0.7);
+                                border = 2, text::FONT_COLOR_VAR.map_into();
+
+                                transform = Transform::new_translate_z(100).then(match i {
+                                    1 => Transform::new_rotate_y(0.deg()),
+                                    2 => Transform::new_rotate_y(90.deg()),
+                                    3 => Transform::new_rotate_y(180.deg()),
+                                    4 => Transform::new_rotate_y(-90.deg()),
+                                    5 => Transform::new_rotate_x(90.deg()),
+                                    6 => Transform::new_rotate_x(-90.deg()),
+                                    _ => unreachable!()
+                                });
+                            }
+                            .boxed()
+                        })
+                        .collect::<UiNodeVec>();
+
+                    transform = show
+                        .map(|&i| {
+                            match i {
+                                1 => Transform::new_rotate_y(0.deg()),
+                                2 => Transform::new_rotate_y(-90.deg()),
+                                3 => Transform::new_rotate_y(-180.deg()),
+                                4 => Transform::new_rotate_y(90.deg()),
+                                5 => Transform::new_rotate_x(-90.deg()),
+                                6 => Transform::new_rotate_x(90.deg()),
+                                _ => unreachable!(),
+                            }
+                            .translate_z(-100)
+                        })
+                        .easing_with(1.secs(), easing::linear, slerp_sampler)
                 }
             },
             Wrap! {
                 align = Align::CENTER;
                 toggle::selector = toggle::Selector::single(show.clone());
                 spacing = 5;
-                children = (1..=6u8).map(|i| Toggle! {
-                    style_fn = toggle::RadioStyle!();
-                    value::<u8> = i;
-                    child = Text!(i.to_txt());
-                }).collect::<UiNodeVec>();
+                children = (1..=6u8)
+                    .map(|i| {
+                        Toggle! {
+                            style_fn = toggle::RadioStyle!();
+                            value::<u8> = i;
+                            child = Text!(i.to_txt());
+                        }
+                    })
+                    .collect::<UiNodeVec>();
             }
         ];
     }
@@ -362,15 +369,18 @@ fn open_touch_example() -> impl UiNode {
             } else {
                 let parent = WINDOW.id();
                 is_open.set(true);
-                WINDOWS.open_id(example_id, async_clmv!(is_open, {
-                    Window! {
-                        title = "Transform Example - Touch";
-                        state = WindowState::Maximized;
-                        parent;
-                        child = touch_example();
-                        on_close = hn_once!(|_| is_open.set(false));
-                    }
-                }));
+                WINDOWS.open_id(
+                    example_id,
+                    async_clmv!(is_open, {
+                        Window! {
+                            title = "Transform Example - Touch";
+                            state = WindowState::Maximized;
+                            parent;
+                            child = touch_example();
+                            on_close = hn_once!(|_| is_open.set(false));
+                        }
+                    }),
+                );
             }
         })
     }
@@ -402,7 +412,6 @@ fn touch_example() -> impl UiNode {
                 background_color = web_colors::DODGER_BLUE;
                 corner_radius = 10;
             },
-
             Stack! {
                 toggle::selector = toggle::Selector::bitflags(mode);
                 direction = StackDirection::top_to_bottom();
diff --git a/examples/window/src/main.rs b/examples/window/src/main.rs
index 61ac16fd5..a38287d8f 100644
--- a/examples/window/src/main.rs
+++ b/examples/window/src/main.rs
@@ -59,35 +59,22 @@ async fn main_window() -> window::WindowRoot {
                 Stack! {
                     direction = StackDirection::top_to_bottom();
                     spacing = 20;
-                    children = ui_vec![
-                        state_commands(),
-                        focus_control(),
-                    ]
+                    children = ui_vec![state_commands(), focus_control()]
                 },
                 Stack! {
                     direction = StackDirection::top_to_bottom();
                     spacing = 20;
-                    children = ui_vec![
-                        state(),
-                        visibility_example(),
-                    ];
+                    children = ui_vec![state(), visibility_example()];
                 },
                 Stack! {
                     direction = StackDirection::top_to_bottom();
                     spacing = 20;
-                    children = ui_vec![
-                        icon_example(),
-                        background_color_example(background),
-                    ];
+                    children = ui_vec![icon_example(), background_color_example(background)];
                 },
                 Stack! {
                     direction = StackDirection::top_to_bottom();
                     spacing = 20;
-                    children = ui_vec![
-                        screenshot(),
-                        misc(),
-                        native(),
-                    ];
+                    children = ui_vec![screenshot(), misc(), native()];
                 },
             ];
         };
@@ -165,7 +152,6 @@ fn screenshot() -> impl UiNode {
                     }
                 }
 
-
                 enabled.set(true);
             });
             enabled;
@@ -188,29 +174,30 @@ fn screenshot() -> impl UiNode {
 
                 tracing::info!("taking `screenshot.png` using a new headless window ..");
                 let parent = WINDOW.id();
-                WINDOWS.open_headless(async_clmv!(enabled, {
-                    Window! {
-                        parent;
-                        size = (500, 400);
-                        background_color = web_colors::DARK_GREEN;
-                        font_size = 72;
-                        child_align = Align::CENTER;
-                        child = Text!("No Head!");
-
-                        frame_capture_mode = FrameCaptureMode::Next;
-                        on_frame_image_ready = async_hn_once!(|args: FrameImageReadyArgs| {
-                            tracing::info!("saving screenshot..");
-                            match args.frame_image.unwrap().save("screenshot.png").await {
-                                Ok(_) => tracing::info!("saved"),
-                                Err(e) => tracing::error!("{e}")
-                            }
-                            debug_assert_eq!(WINDOW.id(), args.window_id);
-                            WINDOW.close();
-                            enabled.set(true);
-                        });
-                    }
-                }),
-                    true
+                WINDOWS.open_headless(
+                    async_clmv!(enabled, {
+                        Window! {
+                            parent;
+                            size = (500, 400);
+                            background_color = web_colors::DARK_GREEN;
+                            font_size = 72;
+                            child_align = Align::CENTER;
+                            child = Text!("No Head!");
+
+                            frame_capture_mode = FrameCaptureMode::Next;
+                            on_frame_image_ready = async_hn_once!(|args: FrameImageReadyArgs| {
+                                tracing::info!("saving screenshot..");
+                                match args.frame_image.unwrap().save("screenshot.png").await {
+                                    Ok(_) => tracing::info!("saved"),
+                                    Err(e) => tracing::error!("{e}"),
+                                }
+                                debug_assert_eq!(WINDOW.id(), args.window_id);
+                                WINDOW.close();
+                                enabled.set(true);
+                            });
+                        }
+                    }),
+                    true,
                 );
             });
         }
@@ -369,11 +356,16 @@ fn exclusive_mode() -> impl UiNode {
                     child = Stack! {
                         toggle::selector = toggle::Selector::single(selected_opt);
                         direction = StackDirection::top_to_bottom();
-                        children = [default_opt].into_iter().chain(opts).map(|o| Toggle! {
-                            child = Text!(formatx!("{o}"));
-                            value = o;
-                        })
-                        .collect::<UiNodeVec>();
+                        children = [default_opt]
+                            .into_iter()
+                            .chain(opts)
+                            .map(|o| {
+                                Toggle! {
+                                    child = Text!(formatx!("{o}"));
+                                    value = o;
+                                }
+                            })
+                            .collect::<UiNodeVec>();
                     }
                 };
             }
@@ -583,7 +575,10 @@ fn native() -> impl UiNode {
                 tooltip = Tip!(Text!(r#"Shows a "Yes/No" message, then an "Ok" message dialogs."#));
                 dialog::native_dialogs = true;
                 on_click = async_hn!(|_| {
-                    let rsp = DIALOG.ask("Question?", "Example message. Yes -> Warn, No -> Error.").wait_rsp().await;
+                    let rsp = DIALOG
+                        .ask("Question?", "Example message. Yes -> Warn, No -> Error.")
+                        .wait_rsp()
+                        .await;
                     if rsp {
                         DIALOG.warn("Title", "Yes -> Warn Message").wait_done().await;
                     } else {
@@ -593,14 +588,14 @@ fn native() -> impl UiNode {
             },
             Button! {
                 child = Text!("File Picker");
-                tooltip = Tip!(Text!(r#"Shows a "Directory Picker", then an "Open Many Files", then a "Save File" dialogs."#));
+                tooltip = Tip!(Text!(
+                    r#"Shows a "Directory Picker", then an "Open Many Files", then a "Save File" dialogs."#
+                ));
                 dialog::native_dialogs = true;
                 on_click = async_hn!(|_| {
                     let res = DIALOG.select_folder("Select Dir", "", "").wait_rsp().await;
                     let dir = match res {
-                        dialog::FileDialogResponse::Selected(mut s) => {
-                            s.remove(0)
-                        }
+                        dialog::FileDialogResponse::Selected(mut s) => s.remove(0),
                         dialog::FileDialogResponse::Cancel => {
                             tracing::info!("canceled");
                             return;
@@ -631,16 +626,20 @@ fn native() -> impl UiNode {
                         }
                     };
 
-                    let res = DIALOG.save_file(
-                        "Save File",
-                        first_file.parent().map(|p| p.to_owned()).unwrap_or_default(),
-                        first_file.file_name().map(|p| Txt::from_str(&p.to_string_lossy())).unwrap_or_default(),
-                        filters
-                    ).wait_rsp().await;
+                    let res = DIALOG
+                        .save_file(
+                            "Save File",
+                            first_file.parent().map(|p| p.to_owned()).unwrap_or_default(),
+                            first_file
+                                .file_name()
+                                .map(|p| Txt::from_str(&p.to_string_lossy()))
+                                .unwrap_or_default(),
+                            filters,
+                        )
+                        .wait_rsp()
+                        .await;
                     let save_file = match res {
-                        dialog::FileDialogResponse::Selected(mut s) => {
-                            s.remove(0)
-                        }
+                        dialog::FileDialogResponse::Selected(mut s) => s.remove(0),
                         dialog::FileDialogResponse::Cancel => {
                             tracing::info!("canceled");
                             return;
@@ -676,20 +675,14 @@ fn confirm_close() -> impl WidgetHandler<WindowCloseRequestedArgs> {
                         style_fn = dialog::AskStyle!();
                         title = Text!("Close?");
                         content = SelectableText!("Close the window?");
-                        responses = vec![
-                            dialog::Response::cancel(),
-                            dialog::Response::close(),
-                        ]
+                        responses = vec![dialog::Response::cancel(), dialog::Response::close()]
                     }
                 } else {
                     dialog::Dialog! {
                         style_fn = dialog::AskStyle!();
                         title = Text!("Close all?");
                         content = SelectableText!("Close {} windows?", args.windows.len());
-                        responses = vec![
-                            dialog::Response::cancel(),
-                            dialog::Response::new("close", "Close All"),
-                        ]
+                        responses = vec![dialog::Response::cancel(), dialog::Response::new("close", "Close All")]
                     }
                 };
                 let r = DIALOG.custom(dlg).wait_rsp().await;
@@ -723,7 +716,8 @@ fn section(header: &'static str, items: impl UiNodeList) -> impl UiNode {
             txt = header;
             font_weight = FontWeight::BOLD;
             margin = (0, 4);
-        }].chain(items);
+        }]
+        .chain(items);
     }
 }
 
@@ -736,7 +730,8 @@ fn select<T: VarValue + PartialEq>(header: &'static str, selection: impl Var<T>,
             txt = header;
             font_weight = FontWeight::BOLD;
             margin = (0, 4);
-        }].chain(items);
+        }]
+        .chain(items);
     }
 }
 
diff --git a/tools/cargo-do/src/main.rs b/tools/cargo-do/src/main.rs
index 33090aefd..60e6713a1 100644
--- a/tools/cargo-do/src/main.rs
+++ b/tools/cargo-do/src/main.rs
@@ -721,27 +721,37 @@ fn expand(mut args: Vec<&str>) {
 //    Format workspace, macro test samples, test-crates and the tasks script.
 fn fmt(mut args: Vec<&str>) {
     if take_flag(&mut args, &["--check"]) {
-        cmd("cargo", &["fmt", "--", "--check"], &args);
-        let cases = all_ext("tests/macro-tests/cases", "rs");
-        let cases_str: Vec<_> = cases.iter().map(|s| s.as_str()).collect();
-        cmd("rustfmt", &["--edition", "2021", "--check"], &cases_str);
+        cmd_req("cargo", &["fmt", "--check"], &[]); // fast check for CI
+
+        cmd_req("cargo", &["build", "--quiet", "--package", "cargo-zng"], &[]);
+        let exe = format!("target/debug/cargo-zng{}", std::env::consts::EXE_SUFFIX);
+
+        cmd(&exe, &["zng", "fmt", "--check"], &args);
+        cmd(
+            &exe,
+            &["zng", "fmt", "--check", "--files", "tests/macro-tests/cases/**/*.rs"],
+            &args,
+        );
         for tool_crate in top_cargo_toml("tools") {
-            cmd("cargo", &["fmt", "--manifest-path", &tool_crate, "--", "--check"], &args);
+            cmd(&exe, &["zng", "fmt", "--check", "--manifest-path", &tool_crate], &args);
         }
     } else {
+        print("    building cargo-zng fmt ... ");
+        cmd_req("cargo", &["build", "--quiet", "--package", "cargo-zng"], &[]);
+        let exe = format!("target/debug/cargo-zng{}", std::env::consts::EXE_SUFFIX);
+        println("done");
+
         print("    fmt workspace ... ");
-        cmd("cargo", &["fmt"], &args);
+        cmd(&exe, &["zng", "fmt"], &args);
         println("done");
 
         print("    fmt tests/macro-tests/cases/**/*.rs ... ");
-        let cases = all_ext("tests/macro-tests/cases", "rs");
-        let cases_str: Vec<_> = cases.iter().map(|s| s.as_str()).collect();
-        cmd("rustfmt", &["--edition", "2021"], &cases_str);
+        cmd(&exe, &["zng", "fmt", "--files", "tests/macro-tests/cases/**/*.rs"], &args);
         println("done");
 
         print("    fmt tools ... ");
         for tool_crate in top_cargo_toml("tools") {
-            cmd("cargo", &["fmt", "--manifest-path", &tool_crate], &args);
+            cmd(&exe, &["zng", "fmt", "--manifest-path", &tool_crate], &args);
         }
         println("done");
     }
diff --git a/tools/cargo-do/src/util.rs b/tools/cargo-do/src/util.rs
index a132947df..20ffeb4e0 100644
--- a/tools/cargo-do/src/util.rs
+++ b/tools/cargo-do/src/util.rs
@@ -243,11 +243,6 @@ pub fn top_cargo_toml(dir: &str) -> Vec<String> {
     glob(&format!("{dir}/*/Cargo.toml"))
 }
 
-/// Get all `dir/**/*`.ext files.
-pub fn all_ext(dir: &str, ext: &str) -> Vec<String> {
-    glob(&format!("{dir}/**/*.{ext}"))
-}
-
 // Get all `examples/*/src/main.rs` names.
 pub fn examples() -> Vec<String> {
     match glob::glob("examples/*/src/main.rs") {
diff --git a/tools/color-gen/src/main.rs b/tools/color-gen/src/main.rs
index c942480c9..2c84b82bd 100644
--- a/tools/color-gen/src/main.rs
+++ b/tools/color-gen/src/main.rs
@@ -29,7 +29,9 @@ pub mod xterm_256 {
     }
 
     // credits to https://www.ditig.com/256-colors-cheat-sheet
-    const JSON: &str = include_str! {"xterm-256.json"};
+    const JSON: &str = include_str! {
+        "xterm-256.json"
+    };
 
     #[allow(unused)]
     #[derive(Deserialize)]
@@ -94,7 +96,9 @@ pub mod web_colors {
     }
 
     // credits to https://gist.github.com/raineorshine/10394189
-    const JSON: &str = include_str! {"web_colors.json"};
+    const JSON: &str = include_str! {
+        "web_colors.json"
+    };
 
     #[derive(Deserialize)]
     struct WebColor {
@@ -172,7 +176,9 @@ pub mod colors {
         Ok(s)
     }
 
-    const JSON: &str = include_str! {"colors.json"};
+    const JSON: &str = include_str! {
+        "colors.json"
+    };
 
     #[derive(Deserialize)]
     struct WebColor {


Test patch:
diff --git a/tests/focus.rs b/tests/focus.rs
index ddf800a4b..01a26c9e9 100644
--- a/tests/focus.rs
+++ b/tests/focus.rs
@@ -18,7 +18,14 @@ use zng::{
 pub fn first_and_last_window_events() {
     let app = TestApp::start();
 
-    let mut buttons = ui_vec![Button! { child = Text!("Button 0") }, Button! { child = Text!("Button 1") },];
+    let mut buttons = ui_vec![
+        Button! {
+            child = Text!("Button 0")
+        },
+        Button! {
+            child = Text!("Button 1")
+        },
+    ];
 
     let root_id = WidgetId::new_unique();
     let stack_id = WidgetId::new_unique();
@@ -93,9 +100,21 @@ pub fn window_tab_cycle_index_auto() {
         let tab_ids: Vec<_> = (0..3).map(make_index).collect();
 
         let mut buttons = ui_vec![
-            Button! { id = "btn-0"; child = Text!("Button 0"); tab_index = tab_ids[0] },
-            Button! { id = "btn-1"; child = Text!("Button 1"); tab_index = tab_ids[1] },
-            Button! { id = "btn-2"; child = Text!("Button 2"); tab_index = tab_ids[2] },
+            Button! {
+                id = "btn-0";
+                child = Text!("Button 0");
+                tab_index = tab_ids[0]
+            },
+            Button! {
+                id = "btn-1";
+                child = Text!("Button 1");
+                tab_index = tab_ids[1]
+            },
+            Button! {
+                id = "btn-2";
+                child = Text!("Button 2");
+                tab_index = tab_ids[2]
+            },
         ];
         // we collect the widget_id values in the TAB navigation order.
         let mut ids: Vec<_> = (0..3).map(|i| (buttons.item_id(i), tab_ids[i])).collect();
@@ -143,17 +162,37 @@ pub fn window_tab_cycle_and_alt_scope() {
         let tab_ids: Vec<_> = (0..5).map(make_index).collect();
 
         let mut buttons = ui_vec![
-            Button! { id = "btn-0"; child = Text!("Button 0"); tab_index = tab_ids[0] },
-            Button! { id = "btn-1"; child = Text!("Button 1"); tab_index = tab_ids[1] },
+            Button! {
+                id = "btn-0";
+                child = Text!("Button 0");
+                tab_index = tab_ids[0]
+            },
+            Button! {
+                id = "btn-1";
+                child = Text!("Button 1");
+                tab_index = tab_ids[1]
+            },
         ];
         let mut ids: Vec<_> = (0..2).map(|i| (buttons.item_id(i), tab_ids[i])).collect();
         ids.sort_by_key(|(_, ti)| *ti);
         let ids: Vec<_> = ids.into_iter().map(|(id, _)| id).collect();
 
         let mut alt_buttons = ui_vec![
-            Button! { id = "alt-0"; child = Text!("Alt 0"); tab_index = tab_ids[2] },
-            Button! { id = "alt-1"; child = Text!("Alt 1"); tab_index = tab_ids[3] },
-            Button! { id = "alt-2"; child = Text!("Alt 2"); tab_index = tab_ids[4] },
+            Button! {
+                id = "alt-0";
+                child = Text!("Alt 0");
+                tab_index = tab_ids[2]
+            },
+            Button! {
+                id = "alt-1";
+                child = Text!("Alt 1");
+                tab_index = tab_ids[3]
+            },
+            Button! {
+                id = "alt-2";
+                child = Text!("Alt 2");
+                tab_index = tab_ids[4]
+            },
         ];
         let mut alt_ids: Vec<_> = (0..3).map(|i| (alt_buttons.item_id(i), tab_ids[i + 2])).collect();
         alt_ids.sort_by_key(|(_, ti)| *ti);
@@ -247,9 +286,21 @@ fn window_tab_contained_and_continue(tab_nav: TabNav) {
         let tab_ids: Vec<_> = (0..3).map(make_index).collect();
 
         let mut buttons = ui_vec![
-            Button! { id = "btn-0"; child = Text!("Button 0"); tab_index = tab_ids[0] },
-            Button! { id = "btn-1"; child = Text!("Button 1"); tab_index = tab_ids[1] },
-            Button! { id = "btn-2"; child = Text!("Button 2"); tab_index = tab_ids[2] },
+            Button! {
+                id = "btn-0";
+                child = Text!("Button 0");
+                tab_index = tab_ids[0]
+            },
+            Button! {
+                id = "btn-1";
+                child = Text!("Button 1");
+                tab_index = tab_ids[1]
+            },
+            Button! {
+                id = "btn-2";
+                child = Text!("Button 2");
+                tab_index = tab_ids[2]
+            },
         ];
         // we collect the widget_id values in the TAB navigation order.
         let mut ids: Vec<_> = (0..3).map(|i| (buttons.item_id(i), tab_ids[i])).collect();
@@ -302,9 +353,18 @@ fn window_tab_once_and_none(tab_nav: TabNav) {
         let tab_ids: Vec<_> = (0..3).map(make_index).collect();
 
         let mut buttons = ui_vec![
-            Button! { child = Text!("Button 0"); tab_index = tab_ids[0] },
-            Button! { child = Text!("Button 1"); tab_index = tab_ids[1] },
-            Button! { child = Text!("Button 2"); tab_index = tab_ids[2] },
+            Button! {
+                child = Text!("Button 0");
+                tab_index = tab_ids[0]
+            },
+            Button! {
+                child = Text!("Button 1");
+                tab_index = tab_ids[1]
+            },
+            Button! {
+                child = Text!("Button 2");
+                tab_index = tab_ids[2]
+            },
         ];
         // we collect the widget_id values in the TAB navigation order.
         let mut ids: Vec<_> = (0..3).map(|i| (buttons.item_id(i), tab_ids[i])).collect();
@@ -348,16 +408,28 @@ fn two_continue_scopes_or_containers_in_tab_cycle_window(focus_scope: bool) {
     let app = TestApp::start();
 
     let mut buttons_a = ui_vec![
-        Button! { child = Text!("Button 0") },
-        Button! { child = Text!("Button 1") },
-        Button! { child = Text!("Button 2") },
+        Button! {
+            child = Text!("Button 0")
+        },
+        Button! {
+            child = Text!("Button 1")
+        },
+        Button! {
+            child = Text!("Button 2")
+        },
     ];
     let ids_a: Vec<_> = (0..3).map(|i| buttons_a.item_id(i)).collect();
 
     let mut buttons_b = ui_vec![
-        Button! { child = Text!("Button 0") },
-        Button! { child = Text!("Button 1") },
-        Button! { child = Text!("Button 2") },
+        Button! {
+            child = Text!("Button 0")
+        },
+        Button! {
+            child = Text!("Button 1")
+        },
+        Button! {
+            child = Text!("Button 2")
+        },
     ];
     let ids_b: Vec<_> = (0..3).map(|i| buttons_b.item_id(i)).collect();
 
@@ -431,16 +503,34 @@ pub fn two_continue_scopes_with_mixed_indexes() {
     // jump back to a higher priority index without visiting all indexes.
 
     let mut buttons_a = ui_vec![
-        Button! { child = Text!("Button 0"); tab_index = 0; },
-        Button! { child = Text!("Button 2"); tab_index = 5; },
-        Button! { child = Text!("Button 1"); tab_index = 3; },
+        Button! {
+            child = Text!("Button 0");
+            tab_index = 0;
+        },
+        Button! {
+            child = Text!("Button 2");
+            tab_index = 5;
+        },
+        Button! {
+            child = Text!("Button 1");
+            tab_index = 3;
+        },
     ];
     let ids_a: Vec<_> = (0..3).map(|i| buttons_a.item_id(i)).collect();
 
     let mut buttons_b = ui_vec![
-        Button! { child = Text!("Button 3"); tab_index = 2; },
-        Button! { child = Text!("Button 4"); tab_index = 4; },
-        Button! { child = Text!("Button 5"); tab_index = 6; },
+        Button! {
+            child = Text!("Button 3");
+            tab_index = 2;
+        },
+        Button! {
+            child = Text!("Button 4");
+            tab_index = 4;
+        },
+        Button! {
+            child = Text!("Button 5");
+            tab_index = 6;
+        },
     ];
     let ids_b: Vec<_> = (0..3).map(|i| buttons_b.item_id(i)).collect();
 
@@ -507,16 +597,34 @@ pub fn two_containers_with_mixed_indexes() {
     // from on container to another.
 
     let mut buttons_a = ui_vec![
-        Button! { child = Text!("Button 0"); tab_index = 0; },
-        Button! { child = Text!("Button 2"); tab_index = 5; },
-        Button! { child = Text!("Button 1"); tab_index = 3; },
+        Button! {
+            child = Text!("Button 0");
+            tab_index = 0;
+        },
+        Button! {
+            child = Text!("Button 2");
+            tab_index = 5;
+        },
+        Button! {
+            child = Text!("Button 1");
+            tab_index = 3;
+        },
     ];
     let ids_a: Vec<_> = (0..3).map(|i| buttons_a.item_id(i)).collect();
 
     let mut buttons_b = ui_vec![
-        Button! { child = Text!("Button 3"); tab_index = 2; },
-        Button! { child = Text!("Button 4"); tab_index = 4; },
-        Button! { child = Text!("Button 5"); tab_index = 6; },
+        Button! {
+            child = Text!("Button 3");
+            tab_index = 2;
+        },
+        Button! {
+            child = Text!("Button 4");
+            tab_index = 4;
+        },
+        Button! {
+            child = Text!("Button 5");
+            tab_index = 6;
+        },
     ];
     let ids_b: Vec<_> = (0..3).map(|i| buttons_b.item_id(i)).collect();
 
@@ -567,9 +675,19 @@ pub fn tab_index_skip() {
     let app = TestApp::start();
 
     let mut buttons = ui_vec![
-        Button! { id = "Button 0"; child = Text!("Button 0") },
-        Button! { id = "Button 1"; child = Text!("Button 1"); tab_index = TabIndex::SKIP; },
-        Button! { id = "Button 2"; child = Text!("Button 2") },
+        Button! {
+            id = "Button 0";
+            child = Text!("Button 0")
+        },
+        Button! {
+            id = "Button 1";
+            child = Text!("Button 1");
+            tab_index = TabIndex::SKIP;
+        },
+        Button! {
+            id = "Button 2";
+            child = Text!("Button 2")
+        },
     ];
     let ids: Vec<_> = (0..3).map(|i| buttons.item_id(i)).collect();
 
@@ -595,12 +713,23 @@ pub fn tab_inner_container() {
 
     // sanity check for `tab_skip_inner_container`.
 
-    let mut inner_buttons = ui_vec![Button! { child = Text!("Button 1") }, Button! { child = Text!("Button 2") },];
+    let mut inner_buttons = ui_vec![
+        Button! {
+            child = Text!("Button 1")
+        },
+        Button! {
+            child = Text!("Button 2")
+        },
+    ];
     let inner_ids: Vec<_> = (0..2).map(|i| inner_buttons.item_id(i)).collect();
     let mut children = ui_vec![
-        Button! { child = Text!("Button 0") },
+        Button! {
+            child = Text!("Button 0")
+        },
         Stack!(top_to_bottom, inner_buttons),
-        Button! { child = Text!("Button 3") },
+        Button! {
+            child = Text!("Button 3")
+        },
     ];
     let item_ids: Vec<_> = (0..3).map(|i| children.item_id(i)).collect();
 
@@ -630,16 +759,27 @@ pub fn tab_skip_inner_container() {
     // but that the items inside will still tab navigate if focused
     // directly.
 
-    let mut inner_buttons = ui_vec![Button! { child = Text!("Button 1") }, Button! { child = Text!("Button 2") },];
+    let mut inner_buttons = ui_vec![
+        Button! {
+            child = Text!("Button 1")
+        },
+        Button! {
+            child = Text!("Button 2")
+        },
+    ];
     let inner_ids: Vec<_> = (0..2).map(|i| inner_buttons.item_id(i)).collect();
     let mut children = ui_vec![
-        Button! { child = Text!("Button 0") },
+        Button! {
+            child = Text!("Button 0")
+        },
         Stack! {
             direction = StackDirection::top_to_bottom();
             children = inner_buttons;
             tab_index = TabIndex::SKIP;
         },
-        Button! { child = Text!("Button 3") },
+        Button! {
+            child = Text!("Button 3")
+        },
     ];
     let item_ids: Vec<_> = (0..3).map(|i| children.item_id(i)).collect();
 
@@ -682,12 +822,21 @@ pub fn tab_inner_scope_continue() {
     // sanity check for `tab_skip_inner_scope_continue`.
 
     let mut inner_buttons = ui_vec![
-        Button! { id = "Button 1"; child = Text!("Button 1") },
-        Button! { id = "Button 2"; child = Text!("Button 2") },
+        Button! {
+            id = "Button 1";
+            child = Text!("Button 1")
+        },
+        Button! {
+            id = "Button 2";
+            child = Text!("Button 2")
+        },
     ];
     let inner_ids: Vec<_> = (0..2).map(|i| inner_buttons.item_id(i)).collect();
     let mut children = ui_vec![
-        Button! { id = "Button 0"; child = Text!("Button 0") },
+        Button! {
+            id = "Button 0";
+            child = Text!("Button 0")
+        },
         Stack! {
             id = "Scope Continue";
             direction = StackDirection::top_to_bottom();
@@ -695,7 +844,10 @@ pub fn tab_inner_scope_continue() {
             focus_scope = true;
             tab_nav = TabNav::Continue;
         },
-        Button! { id = "Button 3"; child = Text!("Button 3") },
+        Button! {
+            id = "Button 3";
+            child = Text!("Button 3")
+        },
     ];
     let item_ids: Vec<_> = (0..3).map(|i| children.item_id(i)).collect();
 
@@ -726,12 +878,21 @@ pub fn tab_skip_inner_scope_continue() {
     // directly.
 
     let mut inner_buttons = ui_vec![
-        Button! { id = "Button 1"; child = Text!("Button 1") },
-        Button! { id = "Button 2"; child = Text!("Button 2") },
+        Button! {
+            id = "Button 1";
+            child = Text!("Button 1")
+        },
+        Button! {
+            id = "Button 2";
+            child = Text!("Button 2")
+        },
     ];
     let inner_ids: Vec<_> = (0..2).map(|i| inner_buttons.item_id(i)).collect();
     let mut children = ui_vec![
-        Button! { id = "Button 0"; child = Text!("Button 0") },
+        Button! {
+            id = "Button 0";
+            child = Text!("Button 0")
+        },
         Stack! {
             id = "v_stack";
             direction = StackDirection::top_to_bottom();
@@ -740,7 +901,10 @@ pub fn tab_skip_inner_scope_continue() {
             tab_nav = TabNav::Continue;
             tab_index = TabIndex::SKIP;
         },
-        Button! { id = "Button 3"; child = Text!("Button 3") },
+        Button! {
+            id = "Button 3";
+            child = Text!("Button 3")
+        },
     ];
     let item_ids: Vec<_> = (0..3).map(|i| children.item_id(i)).collect();
 
@@ -782,17 +946,28 @@ pub fn tab_inner_scope_cycle() {
 
     // we expect tab navigation to enter the inner scope and get trapped in there.
 
-    let mut inner_buttons = ui_vec![Button! { child = Text!("Button 1") }, Button! { child = Text!("Button 2") },];
+    let mut inner_buttons = ui_vec![
+        Button! {
+            child = Text!("Button 1")
+        },
+        Button! {
+            child = Text!("Button 2")
+        },
+    ];
     let inner_ids: Vec<_> = (0..2).map(|i| inner_buttons.item_id(i)).collect();
     let mut children = ui_vec![
-        Button! { child = Text!("Button 0") },
+        Button! {
+            child = Text!("Button 0")
+        },
         Stack! {
             direction = StackDirection::top_to_bottom();
             children = inner_buttons;
             focus_scope = true;
             tab_nav = TabNav::Cycle;
         },
-        Button! { child = Text!("Button 3") },
+        Button! {
+            child = Text!("Button 3")
+        },
     ];
     let item_ids: Vec<_> = (0..3).map(|i| children.item_id(i)).collect();
 
@@ -827,17 +1002,28 @@ pub fn tab_inner_scope_contained() {
 
     // we expect tab navigation to enter the inner scope and get trapped in there.
 
-    let mut inner_buttons = ui_vec![Button! { child = Text!("Button 1") }, Button! { child = Text!("Button 2") },];
+    let mut inner_buttons = ui_vec![
+        Button! {
+            child = Text!("Button 1")
+        },
+        Button! {
+            child = Text!("Button 2")
+        },
+    ];
     let inner_ids: Vec<_> = (0..2).map(|i| inner_buttons.item_id(i)).collect();
     let mut children = ui_vec![
-        Button! { child = Text!("Button 0") },
+        Button! {
+            child = Text!("Button 0")
+        },
         Stack! {
             direction = StackDirection::top_to_bottom();
             children = inner_buttons;
             focus_scope = true;
             tab_nav = TabNav::Contained;
         },
-        Button! { child = Text!("Button 3") },
+        Button! {
+            child = Text!("Button 3")
+        },
     ];
     let item_ids: Vec<_> = (0..3).map(|i| children.item_id(i)).collect();
 
@@ -872,17 +1058,28 @@ pub fn tab_inner_scope_once() {
 
     // we expect tab navigation to enter the inner scope but then leave it.
 
-    let mut inner_buttons = ui_vec![Button! { child = Text!("Button 1") }, Button! { child = Text!("Button 2") },];
+    let mut inner_buttons = ui_vec![
+        Button! {
+            child = Text!("Button 1")
+        },
+        Button! {
+            child = Text!("Button 2")
+        },
+    ];
     let inner_ids: Vec<_> = (0..2).map(|i| inner_buttons.item_id(i)).collect();
     let mut children = ui_vec![
-        Button! { child = Text!("Button 0") },
+        Button! {
+            child = Text!("Button 0")
+        },
         Stack! {
             direction = StackDirection::top_to_bottom();
             children = inner_buttons;
             focus_scope = true;
             tab_nav = TabNav::Once;
         },
-        Button! { child = Text!("Button 3") },
+        Button! {
+            child = Text!("Button 3")
+        },
     ];
     let item_ids: Vec<_> = (0..3).map(|i| children.item_id(i)).collect();
 
@@ -912,12 +1109,21 @@ pub fn tab_inner_scope_none() {
     // we expect tab navigation to enter the inner scope and then not move.
 
     let mut inner_buttons = ui_vec![
-        Button! { id = "btn-1"; child = Text!("Button 1") },
-        Button! { id = "btn-2"; child = Text!("Button 2") },
+        Button! {
+            id = "btn-1";
+            child = Text!("Button 1")
+        },
+        Button! {
+            id = "btn-2";
+            child = Text!("Button 2")
+        },
     ];
     let inner_ids: Vec<_> = (0..2).map(|i| inner_buttons.item_id(i)).collect();
     let mut children = ui_vec![
-        Button! { id = "btn-0"; child = Text!("Button 0") },
+        Button! {
+            id = "btn-0";
+            child = Text!("Button 0")
+        },
         Stack! {
             id = "v-stack";
             direction = StackDirection::top_to_bottom();
@@ -925,7 +1131,10 @@ pub fn tab_inner_scope_none() {
             focus_scope = true;
             tab_nav = TabNav::None;
         },
-        Button! { id = "btn-3"; child = Text!("Button 3") },
+        Button! {
+            id = "btn-3";
+            child = Text!("Button 3")
+        },
     ];
     let item_ids: Vec<_> = (0..3).map(|i| children.item_id(i)).collect();
 
@@ -968,9 +1177,18 @@ pub fn tab_inner_scope_continue_to_non_focusable_siblings_focusable_child() {
                 direction = StackDirection::top_to_bottom();
                 focus_scope = true;
                 tab_nav = TabNav::Continue;
-                children = ui_vec![Button! { id = btn1; child = Text!("Btn 1"); }];
+                children = ui_vec![Button! {
+                    id = btn1;
+                    child = Text!("Btn 1");
+                }];
             },
-            Stack!(top_to_bottom, ui_vec![Button! { id = btn2; child = Text!("Btn 2"); }])
+            Stack!(
+                top_to_bottom,
+                ui_vec![Button! {
+                    id = btn2;
+                    child = Text!("Btn 2");
+                }]
+            )
         ]
     ));
 
@@ -985,10 +1203,22 @@ pub fn dont_focus_alt_when_alt_pressed_before_focusing_window() {
 
     let start_focus_id = WidgetId::new_unique();
     let buttons = ui_vec![
-        Button! { child = Text!("Button 0"); id = start_focus_id; },
-        Button! { child = Text!("Button 1"); },
+        Button! {
+            child = Text!("Button 0");
+            id = start_focus_id;
+        },
+        Button! {
+            child = Text!("Button 1");
+        },
+    ];
+    let alt_buttons = ui_vec![
+        Button! {
+            child = Text!("Alt 0");
+        },
+        Button! {
+            child = Text!("Alt 1");
+        },
     ];
-    let alt_buttons = ui_vec![Button! { child = Text!("Alt 0"); }, Button! { child = Text!("Alt 1"); },];
 
     let mut app = app.run(Stack!(
         top_to_bottom,
@@ -1018,10 +1248,22 @@ pub fn window_blur_focus() {
 
     let expected_id = WidgetId::new_unique();
     let buttons = ui_vec![
-        Button! { child = Text!("Button 0"); },
-        Button! { child = Text!("Button 1"); id = expected_id; },
+        Button! {
+            child = Text!("Button 0");
+        },
+        Button! {
+            child = Text!("Button 1");
+            id = expected_id;
+        },
+    ];
+    let alt_buttons = ui_vec![
+        Button! {
+            child = Text!("Alt 0");
+        },
+        Button! {
+            child = Text!("Alt 1");
+        },
     ];
-    let alt_buttons = ui_vec![Button! { child = Text!("Alt 0"); }, Button! { child = Text!("Alt 1"); },];
 
     let mut app = app.run(Stack!(
         top_to_bottom,
@@ -1057,7 +1299,10 @@ pub fn focused_removed_by_interactivity() {
     let interactive = var(true);
     focused_removed_test(
         app,
-        Button! { child = Text!("Button 1"); interactive = interactive.clone() },
+        Button! {
+            child = Text!("Button 1");
+            interactive = interactive.clone()
+        },
         || interactive.set(false),
     )
 }
@@ -1065,23 +1310,37 @@ pub fn focused_removed_by_interactivity() {
 pub fn focused_removed_by_collapsing() {
     let app = TestApp::start();
     let visibility = var(Visibility::Visible);
-    focused_removed_test(app, Button! { child = Text!("Button 1"); visibility = visibility.clone() }, || {
-        visibility.set(Visibility::Collapsed)
-    })
+    focused_removed_test(
+        app,
+        Button! {
+            child = Text!("Button 1");
+            visibility = visibility.clone()
+        },
+        || visibility.set(Visibility::Collapsed),
+    )
 }
 #[test]
 pub fn focused_removed_by_making_not_focusable() {
     let app = TestApp::start();
     let focusable = var(true);
-    focused_removed_test(app, Button! { child = Text!("Button 1"); focusable = focusable.clone() }, || {
-        focusable.set(false)
-    })
+    focused_removed_test(
+        app,
+        Button! {
+            child = Text!("Button 1");
+            focusable = focusable.clone()
+        },
+        || focusable.set(false),
+    )
 }
 fn focused_removed_test(app: TestAppBuilder<impl AppExtension>, button1: impl UiNode, set_var: impl FnOnce()) {
     let mut buttons = ui_vec![
-        Button! { child = Text!("Button 0") },
+        Button! {
+            child = Text!("Button 0")
+        },
         button1,
-        Button! { child = Text!("Button 2") },
+        Button! {
+            child = Text!("Button 2")
+        },
     ];
     let ids: Vec<_> = (0..3).map(|i| buttons.item_id(i)).collect();
 
@@ -1212,10 +1471,16 @@ pub fn focus_continued_after_widget_id_move() {
             if a.data().get() {
                 a.set_view(Container! {
                     id = "some_other_place";
-                    child = Button! { id; child = Text!("Button 1") };
+                    child = Button! {
+                        id;
+                        child = Text!("Button 1")
+                    };
                 });
             } else if a.view_is_nil() {
-                a.set_view(Wgt! { focusable = true; id; });
+                a.set_view(Wgt! {
+                    focusable = true;
+                    id;
+                });
             }
         }),
     ));
@@ -1309,7 +1574,7 @@ pub fn focus_goes_to_parent_after_remove() {
             child = Button! {
                 id = child_id;
                 interactive = interactive.clone();
-                child = Text!( "item 'removed'")
+                child = Text!("item 'removed'")
             }
         }]
     ));
@@ -1332,9 +1597,15 @@ pub fn directional_focus_up() {
     let app = TestApp::start();
 
     let mut buttons = ui_vec![
-        Button! { child = Text!("Button 0") },
-        Button! { child = Text!("Button 1") },
-        Button! { child = Text!("Button 2") },
+        Button! {
+            child = Text!("Button 0")
+        },
+        Button! {
+            child = Text!("Button 1")
+        },
+        Button! {
+            child = Text!("Button 2")
+        },
     ];
     let ids: Vec<_> = (0..3).map(|i| buttons.item_id(i)).collect();
 
@@ -1355,9 +1626,15 @@ pub fn directional_focus_down() {
     let app = TestApp::start();
 
     let mut buttons = ui_vec![
-        Button! { child = Text!("Button 0") },
-        Button! { child = Text!("Button 1") },
-        Button! { child = Text!("Button 2") },
+        Button! {
+            child = Text!("Button 0")
+        },
+        Button! {
+            child = Text!("Button 1")
+        },
+        Button! {
+            child = Text!("Button 2")
+        },
     ];
     let ids: Vec<_> = (0..3).map(|i| buttons.item_id(i)).collect();
 
@@ -1377,9 +1654,15 @@ pub fn directional_focus_left() {
     let app = TestApp::start();
 
     let mut buttons = ui_vec![
-        Button! { child = Text!("Button 0") },
-        Button! { child = Text!("Button 1") },
-        Button! { child = Text!("Button 2") },
+        Button! {
+            child = Text!("Button 0")
+        },
+        Button! {
+            child = Text!("Button 1")
+        },
+        Button! {
+            child = Text!("Button 2")
+        },
     ];
     let ids: Vec<_> = (0..3).map(|i| buttons.item_id(i)).collect();
 
@@ -1400,9 +1683,15 @@ pub fn directional_focus_right() {
     let app = TestApp::start();
 
     let mut buttons = ui_vec![
-        Button! { child = Text!("Button 0") },
-        Button! { child = Text!("Button 1") },
-        Button! { child = Text!("Button 2") },
+        Button! {
+            child = Text!("Button 0")
+        },
+        Button! {
+            child = Text!("Button 1")
+        },
+        Button! {
+            child = Text!("Button 2")
+        },
     ];
     let ids: Vec<_> = (0..3).map(|i| buttons.item_id(i)).collect();
 
@@ -1422,9 +1711,15 @@ pub fn directional_cycle_vertical() {
     let app = TestApp::start();
 
     let mut buttons = ui_vec![
-        Button! { child = Text!("Button 0") },
-        Button! { child = Text!("Button 1") },
-        Button! { child = Text!("Button 2") },
+        Button! {
+            child = Text!("Button 0")
+        },
+        Button! {
+            child = Text!("Button 1")
+        },
+        Button! {
+            child = Text!("Button 2")
+        },
     ];
     let ids: Vec<_> = (0..3).map(|i| buttons.item_id(i)).collect();
 
@@ -1446,9 +1741,15 @@ pub fn directional_cycle_horizontal() {
     let app = TestApp::start();
 
     let mut buttons = ui_vec![
-        Button! { child = Text!("Button 0") },
-        Button! { child = Text!("Button 1") },
-        Button! { child = Text!("Button 2") },
+        Button! {
+            child = Text!("Button 0")
+        },
+        Button! {
+            child = Text!("Button 1")
+        },
+        Button! {
+            child = Text!("Button 2")
+        },
     ];
     let ids: Vec<_> = (0..3).map(|i| buttons.item_id(i)).collect();
 
@@ -1470,9 +1771,15 @@ pub fn directional_contained_vertical() {
     let app = TestApp::start();
 
     let mut buttons = ui_vec![
-        Button! { child = Text!("Button 0") },
-        Button! { child = Text!("Button 1") },
-        Button! { child = Text!("Button 2") },
+        Button! {
+            child = Text!("Button 0")
+        },
+        Button! {
+            child = Text!("Button 1")
+        },
+        Button! {
+            child = Text!("Button 2")
+        },
     ];
     let ids: Vec<_> = (0..3).map(|i| buttons.item_id(i)).collect();
 
@@ -1494,9 +1801,15 @@ pub fn directional_contained_horizontal() {
     let app = TestApp::start();
 
     let mut buttons = ui_vec![
-        Button! { child = Text!("Button 0") },
-        Button! { child = Text!("Button 1") },
-        Button! { child = Text!("Button 2") },
+        Button! {
+            child = Text!("Button 0")
+        },
+        Button! {
+            child = Text!("Button 1")
+        },
+        Button! {
+            child = Text!("Button 2")
+        },
     ];
     let ids: Vec<_> = (0..3).map(|i| buttons.item_id(i)).collect();
 
@@ -1519,9 +1832,15 @@ pub fn directional_none() {
         let app = TestApp::start();
 
         let mut buttons = ui_vec![
-            Button! { child = Text!("Button 0") },
-            Button! { child = Text!("Button 1") },
-            Button! { child = Text!("Button 2") },
+            Button! {
+                child = Text!("Button 0")
+            },
+            Button! {
+                child = Text!("Button 1")
+            },
+            Button! {
+                child = Text!("Button 2")
+            },
         ];
         let ids: Vec<_> = (0..3).map(|i| buttons.item_id(i)).collect();
 
@@ -1549,16 +1868,21 @@ pub fn directional_continue_up() {
 
     let start_id = WidgetId::new_unique();
     let mut buttons = ui_vec![
-        Button! { child = Text!("Button 0") },
+        Button! {
+            child = Text!("Button 0")
+        },
         Stack! {
             direction = StackDirection::top_to_bottom();
             focus_scope = true;
             directional_nav = DirectionalNav::Continue;
-            children = ui_vec![
-                Button! { child = Text!("Button 1"); id = start_id; },
-            ];
+            children = ui_vec![Button! {
+                child = Text!("Button 1");
+                id = start_id;
+            }];
+        },
+        Button! {
+            child = Text!("Button 2")
         },
-        Button! { child = Text!("Button 2") },
     ];
     let ids: Vec<_> = (0..3).map(|i| buttons.item_id(i)).collect();
 
@@ -1577,16 +1901,21 @@ pub fn directional_continue_down() {
 
     let start_id = WidgetId::new_unique();
     let mut buttons = ui_vec![
-        Button! { child = Text!("Button 0") },
+        Button! {
+            child = Text!("Button 0")
+        },
         Stack! {
             direction = StackDirection::top_to_bottom();
             focus_scope = true;
             directional_nav = DirectionalNav::Continue;
-            children = ui_vec![
-                Button! { child = Text!("Button 1"); id = start_id; },
-            ];
+            children = ui_vec![Button! {
+                child = Text!("Button 1");
+                id = start_id;
+            }];
+        },
+        Button! {
+            child = Text!("Button 2")
         },
-        Button! { child = Text!("Button 2") },
     ];
     let ids: Vec<_> = (0..3).map(|i| buttons.item_id(i)).collect();
 
@@ -1605,16 +1934,21 @@ pub fn directional_continue_left() {
 
     let start_id = WidgetId::new_unique();
     let mut buttons = ui_vec![
-        Button! { child = Text!("Button 0") },
+        Button! {
+            child = Text!("Button 0")
+        },
         Stack! {
             direction = StackDirection::top_to_bottom();
             focus_scope = true;
             directional_nav = DirectionalNav::Continue;
-            children = ui_vec![
-                Button! { child = Text!("Button 1"); id = start_id; },
-            ];
+            children = ui_vec![Button! {
+                child = Text!("Button 1");
+                id = start_id;
+            }];
+        },
+        Button! {
+            child = Text!("Button 2")
         },
-        Button! { child = Text!("Button 2") },
     ];
     let ids: Vec<_> = (0..3).map(|i| buttons.item_id(i)).collect();
 
@@ -1633,16 +1967,21 @@ pub fn directional_continue_right() {
 
     let start_id = WidgetId::new_unique();
     let mut buttons = ui_vec![
-        Button! { child = Text!("Button 0") },
+        Button! {
+            child = Text!("Button 0")
+        },
         Stack! {
             direction = StackDirection::top_to_bottom();
             focus_scope = true;
             directional_nav = DirectionalNav::Continue;
-            children = ui_vec![
-                Button! { child = Text!("Button 1"); id = start_id; },
-            ];
+            children = ui_vec![Button! {
+                child = Text!("Button 1");
+                id = start_id;
+            }];
+        },
+        Button! {
+            child = Text!("Button 2")
         },
-        Button! { child = Text!("Button 2") },
     ];
     let ids: Vec<_> = (0..3).map(|i| buttons.item_id(i)).collect();
 
diff --git a/tests/macro-tests/cases/widget_new/missing_field_all_multi.rs b/tests/macro-tests/cases/widget_new/missing_field_all_multi.rs
index 425530f5c..d9e9af00d 100644
--- a/tests/macro-tests/cases/widget_new/missing_field_all_multi.rs
+++ b/tests/macro-tests/cases/widget_new/missing_field_all_multi.rs
@@ -9,6 +9,6 @@ fn main() {
         // background_gradient has two fields
         // this is interpreted as an unnamed assign `{ }` is the value
         // and the second value is missing
-        background_gradient = { }
+        background_gradient = {}
     };
 }
diff --git a/tests/macro-tests/cases/widget_new/missing_field_all_multi.stderr b/tests/macro-tests/cases/widget_new/missing_field_all_multi.stderr
index 31966a5fa..cb2ced2db 100644
--- a/tests/macro-tests/cases/widget_new/missing_field_all_multi.stderr
+++ b/tests/macro-tests/cases/widget_new/missing_field_all_multi.stderr
@@ -1,8 +1,8 @@
 error[E0277]: the trait bound `(): IntoVar<LinearGradientAxis>` is not satisfied
   --> cases/widget_new/missing_field_all_multi.rs:12:31
    |
-12 |         background_gradient = { }
-   |         -------------------   ^^^ the trait `IntoVar<LinearGradientAxis>` is not implemented for `()`
+12 |         background_gradient = {}
+   |         -------------------   ^^ the trait `IntoVar<LinearGradientAxis>` is not implemented for `()`
    |         |
    |         required by a bound introduced by this call
    |
@@ -24,7 +24,7 @@ error[E0061]: this method takes 2 arguments but 1 argument was supplied
 9  | |         // background_gradient has two fields
 10 | |         // this is interpreted as an unnamed assign `{ }` is the value
 11 | |         // and the second value is missing
-12 | |         background_gradient = { }
+12 | |         background_gradient = {}
    | |         ^^^^^^^^^^^^^^^^^^^
 13 | |     };
    | |_____- an argument is missing
@@ -37,5 +37,5 @@ note: method defined here
 help: provide the argument
   --> $WORKSPACE/crates/zng-wgt/src/wgt.rs
    |
-   | background_gradient({ }, /* stops */)
+   | background_gradient({}, /* stops */)
    |
diff --git a/tests/macro-tests/cases/widget_new/missing_field_all_single.rs b/tests/macro-tests/cases/widget_new/missing_field_all_single.rs
index 4af42d731..91af97811 100644
--- a/tests/macro-tests/cases/widget_new/missing_field_all_single.rs
+++ b/tests/macro-tests/cases/widget_new/missing_field_all_single.rs
@@ -5,6 +5,6 @@ fn main() {
     let _ = Wgt! {
         // margin has one field
         // this is interpreted as an unnamed assign `{ }` is the value
-        margin = { }
+        margin = {}
     };
 }
diff --git a/tests/macro-tests/cases/widget_new/missing_field_all_single.stderr b/tests/macro-tests/cases/widget_new/missing_field_all_single.stderr
index 375fb70e3..25030560d 100644
--- a/tests/macro-tests/cases/widget_new/missing_field_all_single.stderr
+++ b/tests/macro-tests/cases/widget_new/missing_field_all_single.stderr
@@ -1,8 +1,8 @@
 error[E0277]: the trait bound `(): IntoVar<SideOffsets>` is not satisfied
  --> cases/widget_new/missing_field_all_single.rs:8:18
   |
-8 |         margin = { }
-  |         ------   ^^^ the trait `IntoVar<SideOffsets>` is not implemented for `()`
+8 |         margin = {}
+  |         ------   ^^ the trait `IntoVar<SideOffsets>` is not implemented for `()`
   |         |
   |         required by a bound introduced by this call
   |
diff --git a/tests/macro-tests/cases/widget_new/missing_semi_in_when2.rs b/tests/macro-tests/cases/widget_new/missing_semi_in_when2.rs
index f136fc2d5..fb0adbd2a 100644
--- a/tests/macro-tests/cases/widget_new/missing_semi_in_when2.rs
+++ b/tests/macro-tests/cases/widget_new/missing_semi_in_when2.rs
@@ -12,8 +12,7 @@ fn main() {
         margin = 0;
         cursor = CursorIcon::Default;
         when *#is_pressed {
-            margin =
-            cursor = CursorIcon::Pointer;
+            margin = cursor = CursorIcon::Pointer;
         }
     };
 }
diff --git a/tests/macro-tests/cases/widget_new/missing_semi_in_when2.stderr b/tests/macro-tests/cases/widget_new/missing_semi_in_when2.stderr
index 073f04523..e5b727a57 100644
--- a/tests/macro-tests/cases/widget_new/missing_semi_in_when2.stderr
+++ b/tests/macro-tests/cases/widget_new/missing_semi_in_when2.stderr
@@ -1,8 +1,8 @@
 error: expected `,`
-  --> cases/widget_new/missing_semi_in_when2.rs:16:13
+  --> cases/widget_new/missing_semi_in_when2.rs:15:22
    |
-16 |             cursor = CursorIcon::Pointer;
-   |             ^^^^^^
+15 |             margin = cursor = CursorIcon::Pointer;
+   |                      ^^^^^^
 
 error[E0061]: this method takes 1 argument but 0 arguments were supplied
   --> cases/widget_new/missing_semi_in_when2.rs:15:13
@@ -12,11 +12,10 @@ error[E0061]: this method takes 1 argument but 0 arguments were supplied
 12 | |         margin = 0;
 13 | |         cursor = CursorIcon::Default;
 14 | |         when *#is_pressed {
-15 | |             margin =
+15 | |             margin = cursor = CursorIcon::Pointer;
    | |             ^^^^^^
-16 | |             cursor = CursorIcon::Pointer;
-17 | |         }
-18 | |     };
+16 | |         }
+17 | |     };
    | |_____- an argument is missing
    |
 note: method defined here
diff --git a/tests/macro-tests/cases/widget_new/missing_value4.rs b/tests/macro-tests/cases/widget_new/missing_value4.rs
index 446cf503e..4c17117ab 100644
--- a/tests/macro-tests/cases/widget_new/missing_value4.rs
+++ b/tests/macro-tests/cases/widget_new/missing_value4.rs
@@ -9,8 +9,8 @@ fn main() {
     let _scope = APP.minimal();
     let _ = Wgt! {
         cursor =
-        // we expect these properties to be used.
-        margin = 0;
+                    // we expect these properties to be used.
+                    margin = 0;
         enabled = true;
     };
 }
diff --git a/tests/macro-tests/cases/widget_new/missing_value4.stderr b/tests/macro-tests/cases/widget_new/missing_value4.stderr
index a7a91ed5b..857b5d3e5 100644
--- a/tests/macro-tests/cases/widget_new/missing_value4.stderr
+++ b/tests/macro-tests/cases/widget_new/missing_value4.stderr
@@ -1,8 +1,8 @@
 error: expected `;`
-  --> cases/widget_new/missing_value4.rs:13:9
+  --> cases/widget_new/missing_value4.rs:13:21
    |
-13 |         margin = 0;
-   |         ^^^^^^
+13 |                     margin = 0;
+   |                     ^^^^^^
 
 error[E0061]: this method takes 1 argument but 0 arguments were supplied
   --> cases/widget_new/missing_value4.rs:11:9
@@ -11,8 +11,8 @@ error[E0061]: this method takes 1 argument but 0 arguments were supplied
    |  _____________-
 11 | |         cursor =
    | |         ^^^^^^
-12 | |         // we expect these properties to be used.
-13 | |         margin = 0;
+12 | |                     // we expect these properties to be used.
+13 | |                     margin = 0;
 14 | |         enabled = true;
 15 | |     };
    | |_____- an argument is missing
diff --git a/tests/macro-tests/cases/widget_new/missing_value5.rs b/tests/macro-tests/cases/widget_new/missing_value5.rs
index 04850da8a..61dc3688a 100644
--- a/tests/macro-tests/cases/widget_new/missing_value5.rs
+++ b/tests/macro-tests/cases/widget_new/missing_value5.rs
@@ -3,8 +3,7 @@ use zng::{layout::margin, mouse::cursor, widget::Wgt, APP};
 fn main() {
     let _scope = APP.minimal();
     let _ = Wgt! {
-        cursor =
-        #[allow(unused_imports)]
+        cursor = #[allow(unused_imports)]
         margin = {
             use zng::layout::PxPoint;
             0
diff --git a/tests/macro-tests/cases/widget_new/missing_value5.stderr b/tests/macro-tests/cases/widget_new/missing_value5.stderr
index 9bbcbf3cb..d799100e6 100644
--- a/tests/macro-tests/cases/widget_new/missing_value5.stderr
+++ b/tests/macro-tests/cases/widget_new/missing_value5.stderr
@@ -3,20 +3,20 @@ error: expected expression, found `)`
    |
 5  |       let _ = Wgt! {
    |  _____________^
-6  | |         cursor =
-7  | |         #[allow(unused_imports)]
-8  | |         margin = {
-...  |
-11 | |         }
-12 | |     };
+6  | |         cursor = #[allow(unused_imports)]
+7  | |         margin = {
+8  | |             use zng::layout::PxPoint;
+9  | |             0
+10 | |         }
+11 | |     };
    | |_____^ expected expression
    |
    = note: this error originates in the macro `zng::__proc_macro_util::widget::widget_new` which comes from the expansion of the macro `Wgt` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: expected `;`
- --> cases/widget_new/missing_value5.rs:8:9
+ --> cases/widget_new/missing_value5.rs:7:9
   |
-8 |         margin = {
+7 |         margin = {
   |         ^^^^^^
 
 warning: unused import: `mouse::cursor`
@@ -28,7 +28,7 @@ warning: unused import: `mouse::cursor`
   = note: `#[warn(unused_imports)]` on by default
 
 warning: unused import: `zng::layout::PxPoint`
- --> cases/widget_new/missing_value5.rs:9:17
+ --> cases/widget_new/missing_value5.rs:8:17
   |
-9 |             use zng::layout::PxPoint;
+8 |             use zng::layout::PxPoint;
   |                 ^^^^^^^^^^^^^^^^^^^^
diff --git a/tests/macro-tests/cases/widget_new/unknown_member_in_when_expr1.rs b/tests/macro-tests/cases/widget_new/unknown_member_in_when_expr1.rs
index e6ef080d2..e02b07727 100644
--- a/tests/macro-tests/cases/widget_new/unknown_member_in_when_expr1.rs
+++ b/tests/macro-tests/cases/widget_new/unknown_member_in_when_expr1.rs
@@ -4,7 +4,8 @@ fn main() {
     let _scope = APP.minimal();
     let _ = Wgt! {
         margin = 0;
-        when *#is_pressed.1 { // only .0 or .state allowed.
+        when *#is_pressed.1 {
+            // only .0 or .state allowed.
             margin = 1;
         }
     };
diff --git a/tests/macro-tests/cases/widget_new/unknown_member_in_when_expr1.stderr b/tests/macro-tests/cases/widget_new/unknown_member_in_when_expr1.stderr
index 0f3cdb464..64c6f8289 100644
--- a/tests/macro-tests/cases/widget_new/unknown_member_in_when_expr1.stderr
+++ b/tests/macro-tests/cases/widget_new/unknown_member_in_when_expr1.stderr
@@ -1,10 +1,10 @@
 error[E0599]: no method named `__w_1__` found for struct `zng_wgt_input::state::is_pressed_inputs__` in the current scope
  --> cases/widget_new/unknown_member_in_when_expr1.rs:7:16
   |
-7 |         when *#is_pressed.1 { // only .0 or .state allowed.
+7 |         when *#is_pressed.1 {
   |                ^^^^^^^^^^
   |
 help: there is a method `__w_0__` with a similar name
   |
-7 |         when *#__w_0__.1 { // only .0 or .state allowed.
+7 |         when *#__w_0__.1 {
   |                ~~~~~~~
diff --git a/tests/macro-tests/cases/widget_new/unknown_member_in_when_expr2.rs b/tests/macro-tests/cases/widget_new/unknown_member_in_when_expr2.rs
index 19795a8b8..d7a6528d1 100644
--- a/tests/macro-tests/cases/widget_new/unknown_member_in_when_expr2.rs
+++ b/tests/macro-tests/cases/widget_new/unknown_member_in_when_expr2.rs
@@ -4,7 +4,8 @@ fn main() {
     let _scope = APP.minimal();
     let _ = Wgt! {
         margin = 0;
-        when *#is_pressed.unknown { // only .0 or .state allowed.
+        when *#is_pressed.unknown {
+            // only .0 or .state allowed.
             margin = 1;
         }
     };
diff --git a/tests/macro-tests/cases/widget_new/unknown_member_in_when_expr2.stderr b/tests/macro-tests/cases/widget_new/unknown_member_in_when_expr2.stderr
index 136776261..efac46e11 100644
--- a/tests/macro-tests/cases/widget_new/unknown_member_in_when_expr2.stderr
+++ b/tests/macro-tests/cases/widget_new/unknown_member_in_when_expr2.stderr
@@ -1,10 +1,10 @@
 error[E0599]: no method named `__w_unknown__` found for struct `zng_wgt_input::state::is_pressed_inputs__` in the current scope
  --> cases/widget_new/unknown_member_in_when_expr2.rs:7:16
   |
-7 |         when *#is_pressed.unknown { // only .0 or .state allowed.
+7 |         when *#is_pressed.unknown {
   |                ^^^^^^^^^^
   |
 help: there is a method `__w_0__` with a similar name
   |
-7 |         when *#__w_0__.unknown { // only .0 or .state allowed.
+7 |         when *#__w_0__.unknown {
   |                ~~~~~~~
diff --git a/tests/render-tests/src/tests.rs b/tests/render-tests/src/tests.rs
index 43865c1cf..385d6a70e 100644
--- a/tests/render-tests/src/tests.rs
+++ b/tests/render-tests/src/tests.rs
@@ -18,12 +18,15 @@ pub async fn bw_rgb(render_mode: RenderMode, scale_factor: Factor) {
         clmv!(colors, || {
             Stack! {
                 direction = StackDirection::left_to_right();
-                children = colors.iter().map(|c| {
-                    Wgt! {
-                        widget::background_color = *c;
-                        layout::size = (5, 10);
-                    }
-                }).collect::<UiNodeVec>()
+                children = colors
+                    .iter()
+                    .map(|c| {
+                        Wgt! {
+                            widget::background_color = *c;
+                            layout::size = (5, 10);
+                        }
+                    })
+                    .collect::<UiNodeVec>()
             }
         }),
     );