typst-fmt

Crates.iotypst-fmt
lib.rstypst-fmt
version0.1.0
sourcesrc
created_at2023-03-25 14:32:42.433521
updated_at2023-03-25 14:32:42.433521
descriptionA soon to be formatter for the typst lang
homepage
repositoryhttps://github.com/astrale-sharp/typst-fmt
max_upload_size
id820306
size6,148
(astrale-sharp)

documentation

README

PUBLISHING WITH EMPTY TYPST

Howdy, this will be a formatter for the typst language.

Currently on a very early state, Pull Requests are more than welcome

To contribute the main thing you should help with is making new rules, choosing the order in which they are selected, write test, get familiar with typst AST etc.

When we have a working formatter it will be time to think about optimisations although all ideas are welcomed now as well!



trait Rule {
    fn accept(&self, syntax_node: &SyntaxNode, context: ()) -> bool;

    fn eat(&self, syntax_node: &SyntaxNode) -> String;

    fn as_dyn(self: Self) -> Box<dyn Rule>
    where
        Self: Sized + 'static,
    {
        Box::new(self)
    }
}

Commit count: 191

cargo fmt