Url and path refactor #9
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	
	No description provided.
		
		Delete branch "url-handling"
	
	Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
WIP: Url and path refactorto Url and path refactor@ -114,3 +95,1 @@},}}let target = Url::parse(target).unwrap_or_else(|_| {is it on purpose that invalid URLs now yield
file:///instead of being skipped?good point, I need to just skip them, I somehow didn't notice this obvious solution to non indexable urls
@ -0,0 +6,4 @@use tracing::{error, info, warn};use crate::Url;where did this come from? isn't it
url::Url? i don't see any definition ofUrlin the crate rootI don't know honestly, this also should be
url::Url@ -0,0 +71,4 @@fn extension(&self) -> Option<OsString>;fn last_segment_starts_with(&self, prefix: &str) -> bool;fn is_dir(&self) -> bool;fn to_dir(&mut self);hmm, this is going to be a bunch more work, but i think it'd be better to make a newtype wrapper for a Url that is a directory that gets returned by this method, instead of mutating in place? it feels like it's too easy to forget to do it. but can be totally left for later
I was mostly thinking about how much pain is going to be calling toString and then parse on the url, so I opted into mutation, but definitely can be changed later) I'll make a todo
i'm a bit surprised by the reqwest and http resources, is this really how LSP expects servers to access files? it feels super wrong, not on your part, on theirs.
other than the nitpicks/questions above looks good^^
@max wrote in #9 (comment):
Well, the lsp server is supposed to support even remote files (like sftp, sshfs etc, so these should be supported i think. That's why I implemented the directory listing pretty protocol agnosticly)