chore: add todo list to autofmt crate
This commit is contained in:
1 parent
2634755620
commit
64d669e934
4 files changed
+24
-1
No files matched your search
@@ -3,3 +3,15 @@
|
|||||||
This crate formats rsx! by parsing call bodies and pretty-printing them back out.
|
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
|
||||||
@@ -2,7 +2,6 @@ use crate::Buffer;
|
|||||||
use dioxus_rsx::*;
|
use dioxus_rsx::*;
|
||||||
use proc_macro2::Span;
|
use proc_macro2::Span;
|
||||||
use std::{fmt::Result, fmt::Write};
|
use std::{fmt::Result, fmt::Write};
|
||||||
use syn::spanned::Spanned;
|
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
enum ShortOptimization {
|
enum ShortOptimization {
|
||||||
|
|||||||
@@ -40,3 +40,14 @@ fn comment_attr_case_work() {
|
|||||||
|
|
||||||
println!("{}", out);
|
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);
|
||||||
|
}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
rsx! { div {} }
|
||||||
Reference in new issue
Block a user