pub struct TreeSitterHost { /* private fields */ }Expand description
The tree-sitter host — builds the built-in GrammarRegistry once and hands
out per-language TreeSitterHighlighters + a LanguagePlugin per grammar
for registration into a hikari Ecosystem.
Implementations§
Source§impl TreeSitterHost
impl TreeSitterHost
Sourcepub fn builtin() -> Result<TreeSitterHost, TsError>
pub fn builtin() -> Result<TreeSitterHost, TsError>
Sourcepub fn plugins(&self) -> Vec<Box<dyn LanguagePlugin>>
pub fn plugins(&self) -> Vec<Box<dyn LanguagePlugin>>
A LanguagePlugin for each built-in grammar, ready to register into a
hikari Ecosystem (each claims its grammar’s extensions).
Sourcepub fn highlighter(&self, grammar: &'static str) -> TreeSitterHighlighter
pub fn highlighter(&self, grammar: &'static str) -> TreeSitterHighlighter
A highlighter for one grammar by name.
Trait Implementations§
Source§impl Clone for TreeSitterHost
impl Clone for TreeSitterHost
Source§fn clone(&self) -> TreeSitterHost
fn clone(&self) -> TreeSitterHost
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for TreeSitterHost
impl RefUnwindSafe for TreeSitterHost
impl Send for TreeSitterHost
impl Sync for TreeSitterHost
impl Unpin for TreeSitterHost
impl UnsafeUnpin for TreeSitterHost
impl UnwindSafe for TreeSitterHost
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more