pub struct LspClient { /* private fields */ }Expand description
One process-spawned language server.
Implementations§
Source§impl LspClient
impl LspClient
pub async fn start( config: LspClientConfig, workspace_root: PathBuf, ) -> Result<Arc<Self>, LspError>
pub fn server_name(&self) -> &str
pub fn workspace_root(&self) -> &Path
pub fn lifecycle_id(&self) -> u64
pub fn bump_lifecycle_id(&self) -> u64
pub async fn initialize_with_timeout( &self, timeout: Duration, ) -> Result<ServerCapabilities, LspError>
Sourcepub fn cached_capabilities(&self) -> Option<ServerCapabilities>
pub fn cached_capabilities(&self) -> Option<ServerCapabilities>
Returns the server capabilities captured during initialize, if available.
pub async fn request<R>( &self, params: R::Params, timeout: Duration, ) -> Result<R::Result, LspError>
pub fn notify<N>(&self, params: N::Params) -> Result<(), LspError>
pub async fn drain_diagnostics( &self, timeout: Duration, ) -> Option<Vec<PublishedDiagnostics>>
pub fn read_diagnostics(&self, uris: &[String]) -> Vec<PublishedDiagnostics>
pub fn diagnostics_file_count(&self) -> usize
pub fn clear_diagnostics(&self)
pub async fn shutdown(&mut self) -> Result<(), LspError>
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for LspClient
impl !RefUnwindSafe for LspClient
impl !UnwindSafe for LspClient
impl Send for LspClient
impl Sync for LspClient
impl Unpin for LspClient
impl UnsafeUnpin for LspClient
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