pub struct LspClient { /* private fields */ }Implementations§
Source§impl LspClient
impl LspClient
pub fn new(language: &str, workspace: &Path) -> Self
pub fn language(&self) -> &str
Sourcepub fn handles_extension(&self, ext: &str) -> bool
pub fn handles_extension(&self, ext: &str) -> bool
Returns true if this client handles files with the given extension.
Sourcepub async fn go_to_definition(
&mut self,
file: &Path,
line: u32,
col: u32,
) -> Result<String>
pub async fn go_to_definition( &mut self, file: &Path, line: u32, col: u32, ) -> Result<String>
Jump to the definition of the symbol at file:line:col (1-based).
Sourcepub async fn find_references(
&mut self,
file: &Path,
line: u32,
col: u32,
) -> Result<String>
pub async fn find_references( &mut self, file: &Path, line: u32, col: u32, ) -> Result<String>
Find all references to the symbol at file:line:col (1-based).
Auto Trait Implementations§
impl !RefUnwindSafe for LspClient
impl !UnwindSafe for LspClient
impl Freeze 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