pub struct LspEngine { /* private fields */ }Implementations§
Source§impl LspEngine
impl LspEngine
pub fn new(config: LspEngineConfig) -> Self
pub fn set_install_progress(&mut self, progress: Arc<dyn InstallProgress>)
pub fn startup_timeout(&self) -> Duration
pub fn start_for_context( &mut self, root_path: &Path, files: &[&Path], ) -> Result<()>
pub fn server_state(&self, lang: Language) -> ServerState
pub fn await_ready( &mut self, lang: Language, timeout: Duration, ) -> Result<ServerState>
pub fn any_pending(&self) -> bool
pub fn poll_events(&mut self) -> Vec<LspEvent>
pub fn shutdown_all(&mut self)
pub fn install_server(&mut self, lang: Language) -> Result<()>
Sourcepub fn restart_server(&mut self, lang: Language) -> Result<()>
pub fn restart_server(&mut self, lang: Language) -> Result<()>
Restart a server that has Failed (or Stopped). Tears down any lingering process, then re-runs the full startup pipeline.
pub fn status_summary(&self) -> Vec<(Language, ServerState)>
pub fn document_symbols( &mut self, file_path: &Path, ) -> Result<Vec<DocumentSymbol>>
pub fn symbol_at_position( &mut self, file_path: &Path, line: usize, col: usize, ) -> Result<Option<DocumentSymbol>>
pub fn symbol_range( &mut self, file_path: &Path, symbol_name: &str, ) -> Result<Option<SymbolRange>>
pub fn notify_document_open( &mut self, file_path: &Path, content: &str, ) -> Result<()>
pub fn notify_document_change( &mut self, file_path: &Path, content: &str, version: i32, ) -> Result<()>
pub fn completions( &mut self, file_path: &Path, line: usize, col: usize, ) -> Result<Vec<CompletionItem>>
pub fn hover( &mut self, file_path: &Path, line: usize, col: usize, ) -> Result<Option<HoverInfo>>
pub fn goto_definition( &mut self, file_path: &Path, line: usize, col: usize, ) -> Result<Option<Location>>
pub fn semantic_tokens( &mut self, file_path: &Path, content: &str, ) -> Result<Vec<SemanticToken>>
pub fn selection_range( &mut self, file_path: &Path, line: usize, col: usize, ) -> Result<SelectionRange>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LspEngine
impl !RefUnwindSafe for LspEngine
impl Send for LspEngine
impl !Sync for LspEngine
impl Unpin for LspEngine
impl UnsafeUnpin for LspEngine
impl !UnwindSafe for LspEngine
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> 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