mirror of
https://github.com/denoland/deno.git
synced 2024-12-22 07:14:47 -05:00
lsp: use deno:/asset instead of deno:asset (#16023)
Make offering "virtual documents" via the lsp easier to parse. `deno:` can be ambiguous to parse by editors (can conflict with linux paths) Neovim recently landed a PR https://github.com/neovim/neovim/pull/19797 that allows it to parse `scheme:/` this PR should make deno lsp work correctly in neovim
This commit is contained in:
parent
ecfafda9d8
commit
a6618dc01c
2 changed files with 5 additions and 5 deletions
|
@ -101,7 +101,7 @@ impl LspUrlMap {
|
|||
specifier.clone()
|
||||
} else {
|
||||
let specifier_str = if specifier.scheme() == "asset" {
|
||||
format!("deno:asset{}", specifier.path())
|
||||
format!("deno:/asset{}", specifier.path())
|
||||
} else if specifier.scheme() == "data" {
|
||||
let data_url = DataUrl::process(specifier.as_str())
|
||||
.map_err(|e| uri_error(format!("{:?}", e)))?;
|
||||
|
|
|
@ -987,7 +987,7 @@ fn lsp_hover_asset() {
|
|||
"deno/virtualTextDocument",
|
||||
json!({
|
||||
"textDocument": {
|
||||
"uri": "deno:asset/lib.deno.shared_globals.d.ts"
|
||||
"uri": "deno:/asset/lib.deno.shared_globals.d.ts"
|
||||
}
|
||||
}),
|
||||
)
|
||||
|
@ -998,7 +998,7 @@ fn lsp_hover_asset() {
|
|||
"textDocument/hover",
|
||||
json!({
|
||||
"textDocument": {
|
||||
"uri": "deno:asset/lib.es2015.symbol.wellknown.d.ts"
|
||||
"uri": "deno:/asset/lib.es2015.symbol.wellknown.d.ts"
|
||||
},
|
||||
"position": {
|
||||
"line": 109,
|
||||
|
@ -2810,7 +2810,7 @@ fn lsp_code_lens_non_doc_nav_tree() {
|
|||
"deno/virtualTextDocument",
|
||||
json!({
|
||||
"textDocument": {
|
||||
"uri": "deno:asset/lib.deno.shared_globals.d.ts"
|
||||
"uri": "deno:/asset/lib.deno.shared_globals.d.ts"
|
||||
}
|
||||
}),
|
||||
)
|
||||
|
@ -2822,7 +2822,7 @@ fn lsp_code_lens_non_doc_nav_tree() {
|
|||
"textDocument/codeLens",
|
||||
json!({
|
||||
"textDocument": {
|
||||
"uri": "deno:asset/lib.deno.shared_globals.d.ts"
|
||||
"uri": "deno:/asset/lib.deno.shared_globals.d.ts"
|
||||
}
|
||||
}),
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue