Add "go to type definition" action
This commit is contained in:
parent
a842016380
commit
5149c15329
10 changed files with 377 additions and 75 deletions
|
@ -3250,6 +3250,16 @@ impl Project {
|
|||
self.request_lsp(buffer.clone(), GetDefinition { position }, cx)
|
||||
}
|
||||
|
||||
pub fn type_definition<T: ToPointUtf16>(
|
||||
&self,
|
||||
buffer: &ModelHandle<Buffer>,
|
||||
position: T,
|
||||
cx: &mut ModelContext<Self>,
|
||||
) -> Task<Result<Vec<LocationLink>>> {
|
||||
let position = position.to_point_utf16(buffer.read(cx));
|
||||
self.request_lsp(buffer.clone(), GetTypeDefinition { position }, cx)
|
||||
}
|
||||
|
||||
pub fn references<T: ToPointUtf16>(
|
||||
&self,
|
||||
buffer: &ModelHandle<Buffer>,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue