pub fn format_sub_tree<L: FormatLanguage>(
    root: &SyntaxNode<L::SyntaxLanguage>,
    language: L
) -> FormatResult<Printed>
Expand description

Formats a single node within a file, supported by Biome.

This runs a simple heuristic to determine the initial indentation level of the node based on the provided FormatContext, which must match currently the current initial of the file. Additionally, because the reformatting happens only locally the resulting code will be indented with the same level as the original selection, even if it’s a mismatch from the rest of the block the selection is in

It returns a Formatted result