summaryrefslogtreecommitdiff
path: root/cli/lsp/config.rs
diff options
context:
space:
mode:
Diffstat (limited to 'cli/lsp/config.rs')
-rw-r--r--cli/lsp/config.rs8
1 files changed, 7 insertions, 1 deletions
diff --git a/cli/lsp/config.rs b/cli/lsp/config.rs
index 4b96511c0..3c360b683 100644
--- a/cli/lsp/config.rs
+++ b/cli/lsp/config.rs
@@ -1299,7 +1299,13 @@ impl ConfigData {
}
};
- let vendor_dir = config_file.as_ref().and_then(|c| c.vendor_dir_path());
+ let vendor_dir = config_file.as_ref().and_then(|c| {
+ if c.vendor() == Some(true) {
+ Some(c.specifier.to_file_path().ok()?.parent()?.join("vendor"))
+ } else {
+ None
+ }
+ });
// Load lockfile
let lockfile = config_file.as_ref().and_then(resolve_lockfile_from_config);