pub struct LspClient { /* private fields */ }Expand description
An LSP client connection to a language server.
Implementations§
Source§impl LspClient
impl LspClient
Sourcepub async fn start(
name: &str,
command: &str,
args: &[String],
root_path: &Path,
) -> Result<Self, String>
pub async fn start( name: &str, command: &str, args: &[String], root_path: &Path, ) -> Result<Self, String>
Spawn and initialize an LSP server.
Sourcepub async fn get_diagnostics(
&self,
file_path: &PathBuf,
) -> Result<Vec<Diagnostic>, String>
pub async fn get_diagnostics( &self, file_path: &PathBuf, ) -> Result<Vec<Diagnostic>, String>
Get diagnostics for a file by opening it and waiting for the server.
Auto Trait Implementations§
impl !Freeze for LspClient
impl !RefUnwindSafe for LspClient
impl Send for LspClient
impl Sync for LspClient
impl Unpin for LspClient
impl UnsafeUnpin for LspClient
impl !UnwindSafe 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