chore: add todo list to autofmt crate

This commit is contained in:
Jonathan Kelley 2022-07-05 13:31:26 -04:00
parent 2634755620
commit 64d669e934
4 changed files with 24 additions and 1 deletions

View file

@ -3,3 +3,15 @@
This crate formats rsx! by parsing call bodies and pretty-printing them back out.
# Todo:
Sorted roughly in order of what's possible
- [ ] Oneline rsx! calls - blocker because this wrecks formatting
- [ ] Nested RSX calls (important) - unnecessary but desirable
- [ ] RSX edits overstepping each other
- [ ] Collapse components and elements under syntax -
- [ ] Don't eat comments in exprs
- [ ] Format regular exprs
- [ ] Fix prettyplease around chaining
- [ ] Don't eat comments in prettyplease

View file

@ -2,7 +2,6 @@ use crate::Buffer;
use dioxus_rsx::*;
use proc_macro2::Span;
use std::{fmt::Result, fmt::Write};
use syn::spanned::Spanned;
#[derive(Debug)]
enum ShortOptimization {

View file

@ -40,3 +40,14 @@ fn comment_attr_case_work() {
println!("{}", out);
}
#[test]
fn tiny() {
// todo: get oneliner rsx working
let _src = include_str!("./samples/tiny.rsx");
// let formatted = dioxus_autofmt::fmt_file(src);
// let out = dioxus_autofmt::apply_formats(src, formatted);
// println!("{}", out);
}

View file

@ -0,0 +1 @@
rsx! { div {} }