Populate environment from shell

Co-Authored-By: Keith Simmons <keith@zed.dev>
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
Max Brunsfeld 2022-03-07 16:39:50 -08:00
parent bb6ab837cf
commit 5cc5fa2f93
8 changed files with 111 additions and 56 deletions

View file

@ -2,6 +2,7 @@ use anyhow::{anyhow, Context, Result};
use async_compression::futures::bufread::GzipDecoder;
use client::http::{self, HttpClient, Method};
use futures::{future::BoxFuture, FutureExt, StreamExt};
use gpui::Task;
pub use language::*;
use lazy_static::lazy_static;
use regex::Regex;
@ -531,8 +532,8 @@ impl LspAdapter for JsonLspAdapter {
}
}
pub fn build_language_registry() -> LanguageRegistry {
let mut languages = LanguageRegistry::new();
pub fn build_language_registry(login_shell_env_loaded: Task<()>) -> LanguageRegistry {
let mut languages = LanguageRegistry::new(login_shell_env_loaded);
languages.set_language_server_download_dir(
dirs::home_dir()
.expect("failed to determine home directory")