Language Server: textDocument/signatureHelp
Implements a pretty barebones function signature help mechanism in the language server. Users can use `Analysis::resolve_callback()` to get basic information about a call site. Fixes #102
This commit is contained in:
@@ -38,6 +38,7 @@ pub use ra_editor::{
|
||||
Fold, FoldKind
|
||||
};
|
||||
pub use job::{JobToken, JobHandle};
|
||||
pub use descriptors::FnDescriptor;
|
||||
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
||||
pub struct FileId(pub u32);
|
||||
@@ -236,6 +237,11 @@ impl Analysis {
|
||||
let file = self.imp.file_syntax(file_id);
|
||||
ra_editor::folding_ranges(&file)
|
||||
}
|
||||
|
||||
pub fn resolve_callable(&self, file_id: FileId, offset: TextUnit, token: &JobToken)
|
||||
-> Option<(FnDescriptor, Option<usize>)> {
|
||||
self.imp.resolve_callable(file_id, offset, token)
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
|
||||
Reference in New Issue
Block a user