pub struct TreeSitterProvider { /* private fields */ }Expand description
Initialized syntax parser used when no LSP session is available.
Grammar/query readiness is deliberately narrower than workspace-search readiness: tags queries identify syntax captures in one parsed file, while directory traversal, candidate normalization and hierarchy confidence still need explicit provider semantics.
Implementations§
Source§impl TreeSitterProvider
impl TreeSitterProvider
pub fn start( workspace_root: impl Into<PathBuf>, language: TreeSitterLanguage, ) -> Result<Self>
pub fn workspace_root(&self) -> &Path
pub fn language(&self) -> TreeSitterLanguage
pub fn parse(&mut self, source: &str) -> Result<Tree>
pub fn symbol_capture_names(&self) -> &[&str]
pub fn workspace_symbol_client(&self) -> WorkspaceSymbolClient
pub fn hierarchy_client(&self) -> HierarchyClient
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TreeSitterProvider
impl RefUnwindSafe for TreeSitterProvider
impl Send for TreeSitterProvider
impl Sync for TreeSitterProvider
impl Unpin for TreeSitterProvider
impl UnsafeUnpin for TreeSitterProvider
impl UnwindSafe for TreeSitterProvider
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more