From 480894e5c8f9532a4c42477cdf5c058cb8e9e1e3 Mon Sep 17 00:00:00 2001 From: David Sherret Date: Wed, 2 Aug 2023 16:57:25 -0400 Subject: feat(unstable/lsp): support navigating to deno_modules folder (#20030) Closes #20015 Closes https://github.com/denoland/vscode_deno/issues/850 (only for deno_modules, but I don't think this will be possible for the global cache) --- test_util/src/fs.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'test_util/src') diff --git a/test_util/src/fs.rs b/test_util/src/fs.rs index 57ab8ee10..b2f0eceac 100644 --- a/test_util/src/fs.rs +++ b/test_util/src/fs.rs @@ -47,10 +47,14 @@ impl PathRef { PathRef(self.as_path().parent().unwrap().to_path_buf()) } - pub fn uri(&self) -> Url { + pub fn uri_dir(&self) -> Url { Url::from_directory_path(self.as_path()).unwrap() } + pub fn uri_file(&self) -> Url { + Url::from_file_path(self.as_path()).unwrap() + } + pub fn as_path(&self) -> &Path { self.0.as_path() } -- cgit v1.2.3