Trait LanguageEditor

Source
pub trait LanguageEditor: Send + Sync {
    // Provided methods
    fn collect_errors(&self, tree: &Tree, _content: &str) -> Vec<usize> { ... }
    fn format_code(&self, source: &str) -> Result<String> { ... }
}
Expand description

Trait for language-specific operations like validation and formatting

Provided Methods§

Source

fn collect_errors(&self, tree: &Tree, _content: &str) -> Vec<usize>

Collect syntax error line numbers from a tree-sitter parse tree

Source

fn format_code(&self, source: &str) -> Result<String>

Format code according to language conventions

Implementors§