diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 000000000..0ec60d272 --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,6 @@ +{ + "recommendations": [ + "dioxuslabs.dioxus", + "rust-lang.rust-analyzer" + ] +} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json index ebd52887e..4cf40036e 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,7 +1,10 @@ { - "editor.formatOnSave": true, + "editor.formatOnSave": false, "[toml]": { "editor.formatOnSave": false }, + "[rust]": { + "editor.defaultFormatter": "DioxusLabs.dioxus" + }, "rust-analyzer.checkOnSave.allTargets": false, } diff --git a/packages/dioxus-tui/tests/events.rs b/packages/dioxus-tui/tests/events.rs index 6282ef21d..7a93d3ebc 100644 --- a/packages/dioxus-tui/tests/events.rs +++ b/packages/dioxus-tui/tests/events.rs @@ -134,12 +134,13 @@ fn mouse_up() { modifiers: KeyModifiers::NONE, })); cx.render(rsx! { - div { - width: "100%", - height: "100%", + #[dxfmt::skip] + div { + width: "100%", + height: "100%", onmouseup: move |_| { tui_ctx.quit(); - } + } } }) } @@ -173,12 +174,13 @@ fn mouse_enter() { modifiers: KeyModifiers::NONE, })); cx.render(rsx! { - div { - width: "50%", - height: "50%", + #[dxfmt::skip] + div { + width: "50%", + height: "50%", onmouseenter: move |_| { tui_ctx.quit(); - } + } } }) } @@ -212,12 +214,13 @@ fn mouse_exit() { modifiers: KeyModifiers::NONE, })); cx.render(rsx! { - div { - width: "50%", - height: "50%", + #[dxfmt::skip] + div { + width: "50%", + height: "50%", onmouseenter: move |_| { tui_ctx.quit(); - } + } } }) } @@ -251,12 +254,13 @@ fn mouse_move() { modifiers: KeyModifiers::NONE, })); cx.render(rsx! { - div { - width: "100%", - height: "100%", + #[dxfmt::skip] + div { + width: "100%", + height: "100%", onmousemove: move |_| { tui_ctx.quit(); - } + } } }) } @@ -330,12 +334,13 @@ fn click() { modifiers: KeyModifiers::NONE, })); cx.render(rsx! { - div { - width: "100%", - height: "100%", + #[dxfmt::skip] + div { + width: "100%", + height: "100%", onclick: move |_| { tui_ctx.quit(); - } + } } }) } @@ -369,12 +374,13 @@ fn context_menu() { modifiers: KeyModifiers::NONE, })); cx.render(rsx! { - div { - width: "100%", - height: "100%", + #[dxfmt::skip] + div { + width: "100%", + height: "100%", oncontextmenu: move |_| { tui_ctx.quit(); - } + } } }) }