summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNayeem Rahman <nayeemrmn99@gmail.com>2024-05-29 18:08:54 +0100
committerGitHub <noreply@github.com>2024-05-29 18:08:54 +0100
commitfada25b0dd593efee496dabb48ed9cb7a9cb6647 (patch)
tree82f27200d0218ff3cd11c69d30be2c05ce690143
parenta947c6fbf7c71544687c79716eadbffe4bdedc82 (diff)
fix(lsp): don't discover deno.json in vendor dir (#24032)
-rw-r--r--cli/lsp/language_server.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/cli/lsp/language_server.rs b/cli/lsp/language_server.rs
index 137ae4b46..5f79bca32 100644
--- a/cli/lsp/language_server.rs
+++ b/cli/lsp/language_server.rs
@@ -848,7 +848,7 @@ impl Inner {
// We ignore these directories by default because there is a
// high likelihood they aren't relevant. Someone can opt-into
// them by specifying one of them as an enabled path.
- if matches!(dir_name.as_str(), "node_modules" | ".git") {
+ if matches!(dir_name.as_str(), "vendor" | "node_modules" | ".git") {
continue;
}
// ignore cargo target directories for anyone using Deno with Rust
@@ -3678,6 +3678,9 @@ mod tests {
#[test]
fn test_walk_workspace() {
let temp_dir = TempDir::new();
+ temp_dir.create_dir_all("root1/vendor/");
+ temp_dir.write("root1/vendor/mod.ts", ""); // no, vendor
+
temp_dir.create_dir_all("root1/node_modules/");
temp_dir.write("root1/node_modules/mod.ts", ""); // no, node_modules