pub struct IdeIntegration { /* private fields */ }Expand description
IDE integration provider
Implementations§
Source§impl IdeIntegration
impl IdeIntegration
pub fn new() -> Self
Sourcepub fn index_symbols(&mut self, module: &HirModule, source: &str)
pub fn index_symbols(&mut self, module: &HirModule, source: &str)
Index symbols from HIR for navigation
Sourcepub fn symbol_at_position(&self, position: TextSize) -> Option<&Symbol>
pub fn symbol_at_position(&self, position: TextSize) -> Option<&Symbol>
Get symbol at position for hover/goto definition
Sourcepub fn find_references(&self, symbol_name: &str) -> Vec<&Symbol>
pub fn find_references(&self, symbol_name: &str) -> Vec<&Symbol>
Find all references to a symbol
Sourcepub fn completions_at_position(
&self,
_position: TextSize,
prefix: &str,
) -> Vec<CompletionItem>
pub fn completions_at_position( &self, _position: TextSize, prefix: &str, ) -> Vec<CompletionItem>
Get completion suggestions at position
Sourcepub fn add_diagnostic(&mut self, diagnostic: Diagnostic)
pub fn add_diagnostic(&mut self, diagnostic: Diagnostic)
Add a diagnostic
Sourcepub fn diagnostics(&self) -> &[Diagnostic]
pub fn diagnostics(&self) -> &[Diagnostic]
Get all diagnostics
Sourcepub fn add_warning(&mut self, message: String, range: TextRange)
pub fn add_warning(&mut self, message: String, range: TextRange)
Add a warning diagnostic
Trait Implementations§
Source§impl Default for IdeIntegration
impl Default for IdeIntegration
Source§fn default() -> IdeIntegration
fn default() -> IdeIntegration
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for IdeIntegration
impl RefUnwindSafe for IdeIntegration
impl Send for IdeIntegration
impl Sync for IdeIntegration
impl Unpin for IdeIntegration
impl UnwindSafe for IdeIntegration
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