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§
Sourcefn collect_errors(&self, tree: &Tree, _content: &str) -> Vec<usize>
fn collect_errors(&self, tree: &Tree, _content: &str) -> Vec<usize>
Collect syntax error line numbers from a tree-sitter parse tree
Sourcefn format_code(&self, source: &str) -> Result<String>
fn format_code(&self, source: &str) -> Result<String>
Format code according to language conventions