pub struct DaemonLspClient { /* private fields */ }Expand description
Client that connects to a running LSP daemon via Unix socket. Implements the same interface as LspClient for drop-in use.
Implementations§
Source§impl DaemonLspClient
impl DaemonLspClient
Sourcepub fn connect(project_root: &Path, lang_id: &str) -> Result<Self>
pub fn connect(project_root: &Path, lang_id: &str) -> Result<Self>
Connect to a running daemon.
Sourcepub fn ping(&mut self) -> Result<bool>
pub fn ping(&mut self) -> Result<bool>
Check if the daemon has a ready server for our language.
Sourcepub fn get_definition(
&mut self,
rel_path: &str,
line: u32,
character: u32,
) -> Result<Option<LspLocation>>
pub fn get_definition( &mut self, rel_path: &str, line: u32, character: u32, ) -> Result<Option<LspLocation>>
Get definition.
Sourcepub fn get_references(
&mut self,
rel_path: &str,
line: u32,
character: u32,
include_declaration: bool,
) -> Result<Vec<LspLocation>>
pub fn get_references( &mut self, rel_path: &str, line: u32, character: u32, include_declaration: bool, ) -> Result<Vec<LspLocation>>
Get references.
Sourcepub fn get_implementations(
&mut self,
rel_path: &str,
line: u32,
character: u32,
) -> Result<Vec<LspLocation>>
pub fn get_implementations( &mut self, rel_path: &str, line: u32, character: u32, ) -> Result<Vec<LspLocation>>
Get implementations.
Sourcepub fn close_file(&mut self, rel_path: &str) -> Result<()>
pub fn close_file(&mut self, rel_path: &str) -> Result<()>
Close a file.
Sourcepub fn refine_incremental(
&mut self,
delta: &FileDelta,
root_dir: &Path,
) -> Result<usize>
pub fn refine_incremental( &mut self, delta: &FileDelta, root_dir: &Path, ) -> Result<usize>
Incrementally refine: notify the daemon of file changes from a FileDelta. The daemon will close deleted files, re-open modified files, and open added files in the appropriate LSP servers. Returns the number of files processed.
Auto Trait Implementations§
impl Freeze for DaemonLspClient
impl RefUnwindSafe for DaemonLspClient
impl Send for DaemonLspClient
impl Sync for DaemonLspClient
impl Unpin for DaemonLspClient
impl UnsafeUnpin for DaemonLspClient
impl UnwindSafe for DaemonLspClient
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