feat: support untitled url scheme for unsaved documents (#120)

This commit is contained in:
Myriad-Dreamin 2024-03-29 15:26:46 +08:00 committed by GitHub
parent d53bd80d14
commit 529b422189
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
17 changed files with 202 additions and 100 deletions

View file

@ -60,7 +60,7 @@ impl SemanticRequest for GotoDeclarationRequest {
let span_path = ctx.path_for_id(ref_id).ok()?;
let range = ctx.to_lsp_range(ref_range, ref_source);
let uri = Url::from_file_path(span_path).ok()?;
let uri = path_to_url(&span_path).ok()?;
links.push(LocationLink {
origin_selection_range: Some(origin_selection_range),