helix-editor / helix

A post-modern modal text editor.
https://helix-editor.com
Mozilla Public License 2.0
32.81k stars 2.42k forks source link

unable to conver uri to filepath #11334

Open 1925381584 opened 1 month ago

1925381584 commented 1 month ago
OuxS9il0xv

hello, when I goto definition on a varible, This prompt came up. how can i solve it?

win10 C# hx: 24.7

pascalkuthe commented 1 month ago

This is a relative windows path ..\..\..\..\CanJuSheJi.xaml. URLs are always supposed to be absolute paths and that is all the rust url crate (and helix) support https://github.com/servo/rust-url/issues/487#issuecomment-466788623.

The vsoced-uri node package used by vsocde does allow relative paths (it doesn't really try to decode them at all). I don't think we really need to URL crate at all as we are only extracting paths so likely just forking lsp-types, replacing URLs with strings and using something like percent encoding directly (plus some logic to extract out the path) should be easy enough.

1925381584 commented 1 month ago

thanks for your replay, But I still don't understand how to fix it. Or is this not a problem with Helix?

pascalkuthe commented 1 month ago

you can't fix this on your end. It needs to be fixed in the language server or helix

1925381584 commented 1 month ago

Oh, I get it.