Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unable to convert uri to filepath #11334

Closed
1925381584 opened this issue Jul 26, 2024 · 6 comments
Closed

unable to convert uri to filepath #11334

1925381584 opened this issue Jul 26, 2024 · 6 comments
Labels
A-language-server Area: Language server client C-bug Category: This is a bug

Comments

@1925381584
Copy link

1925381584 commented Jul 26, 2024

OuxS9il0xv

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

win10
C#
hx: 24.7

@pascalkuthe
Copy link
Member

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 servo/rust-url#487 (comment).

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
Copy link
Author

1925381584 commented Jul 28, 2024

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

@pascalkuthe
Copy link
Member

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

@1925381584
Copy link
Author

Oh, I get it.

@kirawi kirawi added C-bug Category: This is a bug upstream A-language-server Area: Language server client and removed upstream labels Aug 28, 2024
@rbwork2024
Copy link

rbwork2024 commented Oct 23, 2024

Is that also a standard language server convention requirement or just a requirement for rust-url?

EDIT: I see, URL is absolute as opposed to URI which can be relative. Should language servers always provide a URL? Or is this simply a Helix limitation due to the crate being used to resolve these links?

@the-mikedavis
Copy link
Member

This is just a limitation of using the url I believe. #11889 is working towards dropping that crate and performing the percent encoding/decoding directly

@the-mikedavis the-mikedavis changed the title unable to conver uri to filepath unable to convert uri to filepath Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-language-server Area: Language server client C-bug Category: This is a bug
Projects
None yet
Development

No branches or pull requests

5 participants